Jump to content
Sign in to follow this  
muzle6074

Mail

Recommended Posts

muzle6074

Can I attach files to an email in au3?

I looked at _INetMail and _INetSmtpMail but neither looked like they had the functionality.

Share this post


Link to post
Share on other sites
Juvigy

Yes you can.You can use the outlook object model.

$oOApp = ObjCreate("Outlook.Application")
    $oOMail = $oOApp.CreateItem($olMailItem)
    $oOMail.Save
    With $oOMail
        .To = ("123@12.com")
        .Subject = ""something"
        .Body = "Hi this is a test 
    .attachments.add ("c:\file....")
        .Send

Share this post


Link to post
Share on other sites
muzle6074

Hi Juviqy,

Do I need Outlook installed on the machine for this to work?

Share this post


Link to post
Share on other sites
Juvigy

Yes. And not Outlook express...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.