Jump to content
Sign in to follow this  
Fewmitz

Emailing with AutoIt

Recommended Posts

Fewmitz

So I'm editing a program slightly, and at one point it emails with AutoIt, and the code looks like this:

$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "***************@gmail.com"
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSword"
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    $objEmail.Configuration.Fields.Update
    $objEmail.Send

But I want it to email to me. The email address that's already here (to my understanding) doesn't really exist, and is just for the subject matter of the email. But if I wanted to say, change it to a yahoo email address.

$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"

That's for gmail, so the outgoing "stmp.gmail.com" part would be changed to "smtp.mail.yahoo.com" yes?

And...

$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

That's also for gmail, so if I were on Yahoo according to here :

http://www.emailaddressmanager.com/tips/mail-settings.html

I would need to change it to port 25? Or would I just not need that because gmail doesn't require an access?

And with this:

$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

And

$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

I would keep them the same, correct, as with the rest of them?

~~~~~

Also I'm right in assuming that the email address in the code already there doesn't really exist?

Share this post


Link to post
Share on other sites
big_daddy

Are you aware that AutoIt has an _INetSmtpMail() function?

Share this post


Link to post
Share on other sites
Fewmitz

Apparently not >_>

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  

×