Vaeb Posted April 21, 2008 Posted April 21, 2008 Hi guys!I'm trying to send an email with my google account.This is the code i used (It's not the real email adress^^ but the email adresses i used exist!):$s_SmtpServer = "smtp.gmail.com" ; address for the smtp-server to use - REQUIRED $s_FromName = "Name" ; name from who the email was sent $s_FromAddress = "asdf@gmail.com" ; address from where the mail should come $s_ToAddress = "asdf@asdf.ch" ; destination address of the email - REQUIRED $s_Subject = "Userinfo" ; subject from the email - can be anything you want it to be $as_Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail $s_AttachFiles = "" ; the file you want to attach- leave blank if not needed $s_CcAddress = "" ; address for cc - leave blank if not needed $s_BccAddress = "" ; address for bcc - leave blank if not needed $s_Username = "asdf" ; username for the account used from where the mail gets sent - Optional (Needed for eg GMail) $s_Password = "asdf" ; password for the account used from where the mail gets sent - Optional (Needed for eg GMail) ;$IPPort = 25 ; port used for sending the mail $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS $IPPort=465 ; GMAIL port used for sending the mail ;~ $ssl=1Btw. I used this script as template: http://www.autoitscript.com/forum/index.ph...860&hl=smtpAnd when i run the script i get this error: Error code: 2 Rc:The transport failed to connect to the server.I hope you can help me Greets Vaeb I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
Glyph Posted April 21, 2008 Posted April 21, 2008 (edited) Change this: $ssl = 1 also noticed you commented out the port? Edited April 21, 2008 by BackStabbed tolle indicium
Vaeb Posted April 21, 2008 Author Posted April 21, 2008 I changed ssl to 1. It still doesn't work. I commented the port 25 because I used the gmail port 465. Even if I use smtp port 25 it doesn't work... I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
Glyph Posted April 21, 2008 Posted April 21, 2008 (edited) woops, I missed that. are you getting a different error when you're using ssl? (I am not able to test the SMTP, my IP has been blacklisted... hosting bad forum scripts that send out wayyy too many emails!) Edited April 21, 2008 by BackStabbed tolle indicium
Vaeb Posted April 21, 2008 Author Posted April 21, 2008 (edited) I really have to thank you for your help!No, I get exactly the same error.When I try a script of the German forum, I get this Error: "@ERROR = 4 - Unable to create socket"Edit: I was talking about the last script here: http://www.autoit.de/index.php?page=Thread&threadID=5947 Edited April 21, 2008 by Vaeb I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
Vaeb Posted April 21, 2008 Author Posted April 21, 2008 *push* I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
Developers Jos Posted April 21, 2008 Developers Posted April 21, 2008 (edited) I changed ssl to 1. It still doesn't work. I commented the port 25 because I used the gmail port 465. Even if I use smtp port 25 it doesn't work...Thats doesn't sound right to me. For GMail you need: $IPPort=465 ; GMAIL port used for sending the mail $ssl=1 When you tried this then what is all info from your ComErrorHandler ? Edited April 21, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now