Jump to content

_INetSmtpMail


silvano
 Share

Recommended Posts

Can we see some script?

yes,

myserver.com is example...

$s_SmtpServer = "myserver.com"
$s_FromName = "Silvano"
$s_FromAddress = "info@myserver.com"
$s_ToAddress = "info@myserver.com"
$s_Subject = "test"
Dim $as_Body[2]
$as_Body[0] = "test"
$as_Body[1] = "test2" 
$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body,"myuser","mypass",1)
;$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body,"mypass","myuser",1)
$err = @error
If $Response = 1 Then
    MsgBox(0, "SEND!", "ok",10)
Else
    MsgBox(0, "ERROR", "nook" & $err,10)
EndIf
Link to comment
Share on other sites

If the above one doesn't work for you, try mine. Does the same as above.

Usage:

#Include<SMTP.au3>
   _smtpmail("from address", "to address [2nd address ...]", "server address", ["subject", "mail body", port, "username", "password"])

[] means optional.

SMTP.au3

Live and Learn, 'cause Knowledge is Super Power.
Link to comment
Share on other sites

Try my SMTP email UDF. Here is a post about it in a separate thread

http://www.autoitscript.com/forum/index.ph...st&p=280909

almost for got about this one

http://www.autoitscript.com/forum/index.ph...INetSmtpMailCom

tks to much!! :P

my server don't like the sheckandar script... sorry

I use the mikeytown script with one little modify..

$s_UserName = "myuser" ;just declearing it, no need to fill in
$s_Password = "mypass" ;just declearing it, no need to fill in
$s_Server = "myserver.com"
$temp = StringSplit($s_FromAddress, "@")

;If MsgBox(4, "SMTP", "Would you like to send the email from a smtp server?" & @CRLF & "Click no to send from your computer directly to the mx server (may not work!)") = 6 Then
    ;$s_Server = InputBox("SMTP Server", "Enter SMTP Server Address", "smtp." & $temp[$temp[0]])
    $s_UserName = _Base64Encode($s_UserName) ;(InputBox("Login", "Enter Login Name For SMTP Server" & @CRLF & "Leave blank if you dont need one", $temp[1]))
;   If $s_UserName Then
        $s_Password = _Base64Encode($s_Password,"","*"); (InputBox("Password", "Enter Your Password For The SMTP Server", "", "*"))
;   EndIf
;~ Else
;~  $s_Server = ""
;~  
;~  ;domain lookup
;~  $IP = _INetGetSource ("http://dynupdate.no-ip.com/ip.php")
;~  If @error Or $IP = "" Then
; ................................
; endif
Edited by silvano
Link to comment
Share on other sites

please mikeytown

Can I do to send mail to multiple address email?

like this

$s_ToAddress = "info@myserver.com,info2@myserver.com" oÝ÷ Ú·­º¹Þ®º+r^çM[º×¦j)pjËÚ'+hwèÚÙ,þ«¨µâ'²'^¶5ëRÚLj)_ºw-í+"²0ÛÛ(ºÛayéV®¶­sbgV÷Cµ$5BDó¢fÇC²gV÷C²fײb33c·5õFôFG&W72fײgV÷C²fwC²gV÷C²fײ5$Äh6ýدz
ªè²¶µªèºwm+0¢é]mëhr§ëazÚuÚÞ²Éb觶ũ©ë®*m¶aÆ®¶­sbb33c·5õFôFG&W72ÒgV÷C¶æfô×6W'fW"æ6öÒfwC²ÂfÇC¶æfó$×6W'fW"æ6öÒfwC²ÂfÇC¶æfó4×6W'fW"æ6öÒgV÷C²
This will only work for the SMTP function; it will not work when using the MX function.

Let me know

Link to comment
Share on other sites

Inside the _INetSmtpMail() function this is how it sends out the email.

"RCPT TO: <" & $s_ToAddress & ">" & @CRLFƒoÝŠ÷ Ø
®‰É0k+hëZ®‹§vØb³
.•ÖÞ¶‡!jx¶­¡§]­ë,)ÞŠ{ayìZš™^±Êâ¦Ûh¶¬jëhŠ×6$s_ToAddress = "info@myserver.com>, <info2@myserver.com>, <info3@myserver.com"
This will only work for the SMTP function; it will not work when using the MX function.

Let me know

thanks mikeytown2,

I have used one mail redirect alias from my sever, when the mail is send from your script the alias forward to another two mails

tks a lot! :-D

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