08-18-2010, 05:57 AM
Hey guys
I am trying to solve this problem using QTP where i need to make sure that an email is generated every time i do a successful registration on my product
So the business life cycle is something like this
1. Register on the product
2. An email is generated which i am sending to outlook
Expected result
1. An email is generated on a successful registration ( This email is in a sub folder of my inbox like Notifications_test)
2. If possible do any further validation on the To address field and the body of the email with the template it is supposed to send
Can somebody help?
Till now i have
I will appreciate any help
I am trying to solve this problem using QTP where i need to make sure that an email is generated every time i do a successful registration on my product
So the business life cycle is something like this
1. Register on the product
2. An email is generated which i am sending to outlook
Expected result
1. An email is generated on a successful registration ( This email is in a sub folder of my inbox like Notifications_test)
2. If possible do any further validation on the To address field and the body of the email with the template it is supposed to send
Can somebody help?
Till now i have
Code:
Set olapp = createobject("outlook.application")
set inbox = olapp.getnamespace("mapi").folders
for each fold in inbox
msgbox fold.name
getsubfolders(fold)
next
msgbox Notifications_Test.count
sub getunreadmails(objfolder)
'sub getunreadmails(Notifications_Test)
set col = objfolder.items
for each mail in col
If mail.subject = "[IUSR] Validation Instructions[x@y.com]" then
msgbox mail.subject
msgbox mail.sendername
msgbox mail.body
msgbox mail.senton
end if
next
end sub
I will appreciate any help