Jump to content

SMTP mailing problem


Vaeb
 Share

Recommended Posts

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=1

Btw. I used this script as template: http://www.autoitscript.com/forum/index.ph...860&hl=smtp

And 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 :D

Greets Vaeb

Link to comment
Share on other sites

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 by BackStabbed

tolle indicium

Link to comment
Share on other sites

:D

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 by Vaeb
Link to comment
Share on other sites

  • Developers

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 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.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...