Jump to content
Sign in to follow this  
silvano

_INetSmtpMail

Recommended Posts

silvano

hello,

my smtp server request autentication for

send email...

this is the error when I use the func

<> 500 unrecognised command

I have put in to $s_helo & $s_first my user & mypass but don't work...

how I can do?

Share this post


Link to post
Share on other sites
silvano

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

Share this post


Link to post
Share on other sites
silvano

Can i see line (500) ?

is not a line but a bad command

23:41:43 HELO myuser

23:41:45 intermediate->myserver.com

dec 2

23:41:45 2 <- 500 unrecognized command

23:41:45 <-> 250

Share this post


Link to post
Share on other sites
Glyph

Oh... well i dont have much experience in tcp!


tolle indicium

Share this post


Link to post
Share on other sites
silvano

Oh... well i dont have much experience in tcp!

thanks equal...

I blink my head against the wall :-(

Share this post


Link to post
Share on other sites
mikeytown2
sheck

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.

Share this post


Link to post
Share on other sites
silvano

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

Share this post


Link to post
Share on other sites
silvano

please mikeytown

Can I do to send mail to multiple address email?

like this

$s_ToAddress = "info@myserver.com,info2@myserver.com"

return error code 501 but email was send only to info2

tks

Share this post


Link to post
Share on other sites
mikeytown2

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

Share this post


Link to post
Share on other sites
silvano

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

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  

×