Hi,

Check this link for the complete code (with attachment)

http://www.automationrepository.com/2011/11/how-to-send-emails-using-qtp-from-microsoft-outlook/


*
cheers,
 a n i s h

[QTP Framework 
Tutorials]<http://www.automationrepository.com/2012/03/qtp-framework-types-an-introduction/>|
[QTP
Blogs] <http://www.automationrepository.com/qtp-blogs/>

**
[Subscribe to get new posts in your
Inbox]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
*


On Fri, Aug 16, 2013 at 12:56 PM, Anil Rai <[email protected]> wrote:

>  Hi,
>
> Adding attachment is not a mandatory option, you can skip this one. Else
> if you want to attach some files, then provide the path of the respective
> file like below:
>
> *myMail.Attachment.add="C:\Users\Test.doc"*
>
> And also there is some error in below highlighted word that you've
> mentioned:
>
> myMail.*Attachemet*.add="C:\Users"
>
>
>
> On 8/16/2013 12:17 PM, Deep Satyawali wrote:
>
> chk this out
>
>  deepsatyawali.wordpress.com
>
>
> On Fri, Aug 16, 2013 at 10:40 AM, <[email protected]> wrote:
>
>> i am using below code. But don't know wht do i need to do to attach an
>> attachment. When i run the below desc it gives me error on attachment/
>>
>>
>>   Set objOutlook = CreateObject("Outlook.Application")
>> Set myMail = objOutlook.CreateItem(0)
>>
>> myMail.To = "[email protected]"
>> myMail.Subject = "Sending mail from using QTP"
>>
>> myMail.Attachemet.add="C:\Users"
>>
>> myMail.Body= "Test Mail"
>>
>> 'Send the mail
>> myMail.Send
>> Wait(3)
>>  --
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "QTP - HP Quick Test Professional - Automated Software Testing" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
>  --
> *
> **
> <http://www.mylivesignature.com/>
> *
>  --
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  --
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Regards,
Anish Pillai
My QTP Blog <http://automationrepository.blogspot.com>

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to