Jump to content
Sign in to follow this  
tW34k

_INetSmtpMail

Recommended Posts

tW34k

Really, how can I get this too work? The example which is with the help file doesn't even work.

#include <INet.au3>

$s_SmtpServer = "gmail-smtp-in.l.google.com"

$s_FromName = "Test"

$s_FromAddress = "test@test.com"

$s_ToAddress = "MyGmail@gmail.com"

$s_Subject = "My Test UDF"

Dim $as_Body[2]

$as_Body[0] = "Testing the new email udf"

$as_Body[1] = "Second Line"

$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

$err = @error

If $Response = 1 Then

MsgBox(0, "Success!", "Mail sent")

Else

MsgBox(0, "Error!", "Mail failed with error code " & $err)

EndIf

Does this function not work with gmail perhaps or am I doing something completly wrong?

Share this post


Link to post
Share on other sites
Jos

Gmail requires secure SMTP ... Search in the Examples forum for the _InetSmtpMailCom() UDF I wrote that supports Gmail ...

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
tW34k

Thank you sir.

Nice, I looked it up. Just one question though. Why do you need secure mode? It's very possible to do this manualy via command without logging into any gmail accounts.

Edited by tW34k

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  

×