E
Erika
[Note: parts of this message were removed to make it a legal post.]
Hi,
I have to check the body of the email which is a html code, like the
following:
<tr><td>Text1: </td>
<td>Text2</td>
I have to check that for "Text1" what "Text2" is shown, which can vary
for different reasons.
I managed to get the emails, to check the subject of the email to
identify the correct email, but I can't get to resolve this problem
which I mentioned previously.
Thank you,
Erika
require 'net/pop'
pop = Net:OP3.new('smtp server name')
pop.start('user', 'parola')
if pop.mails.empty?
puts 'No mail.'
else
i = 0
pop.each_mail do |m|
sbj=m.header.split("\r\n").grep(/^Subject:/)
rate=m.pop.grep(/^Test1/)
puts sbj
puts m.pop
i += 1
end
puts "#{pop.mails.size} mails popped."
end
pop.finish
Hi,
I have to check the body of the email which is a html code, like the
following:
<tr><td>Text1: </td>
<td>Text2</td>
I have to check that for "Text1" what "Text2" is shown, which can vary
for different reasons.
I managed to get the emails, to check the subject of the email to
identify the correct email, but I can't get to resolve this problem
which I mentioned previously.
Thank you,
Erika
require 'net/pop'
pop = Net:OP3.new('smtp server name')
pop.start('user', 'parola')
if pop.mails.empty?
puts 'No mail.'
else
i = 0
pop.each_mail do |m|
sbj=m.header.split("\r\n").grep(/^Subject:/)
rate=m.pop.grep(/^Test1/)
puts sbj
puts m.pop
i += 1
end
puts "#{pop.mails.size} mails popped."
end
pop.finish