neal83 Posted July 20, 2009 Posted July 20, 2009 hi everyone bit of a noob question but why when i try to use the _INetSmtpMail function do i always get 'unable to connect to server response #include <INet.au3> $s_SmtpServer = "mysmtpserver.com.au" $s_FromName = "My Name" $s_FromAddress = "From eMail Address" $s_ToAddress = "To eMail Address" $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 i suspect that i need to be running my own mail server on my computer, how do you guys do it, is there a server out there that allows you to use it for testing?
trancexx Posted July 21, 2009 Posted July 21, 2009 hi everyone bit of a noob question but why when i try to use the _INetSmtpMail function do i always get 'unable to connect to server response #include <INet.au3> $s_SmtpServer = "mysmtpserver.com.au" $s_FromName = "My Name" $s_FromAddress = "From eMail Address" $s_ToAddress = "To eMail Address" $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 i suspect that i need to be running my own mail server on my computer, how do you guys do it, is there a server out there that allows you to use it for testing? No you don't. All you would need to know for that to work is your ISP. And yours is? ♡♡♡ . eMyvnE
KaFu Posted July 21, 2009 Posted July 21, 2009 Search for an open SMTP relay (rare due to obvious abuse), install your own SMTP server... or check the settings from your standard Email provder (ISP, Webmail), in the FAQ there's usually a passage about SMTP and POP3 settings... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
rudi Posted July 23, 2009 Posted July 23, 2009 hi everyone bit of a noob question but why when i try to use the _INetSmtpMail function do i always get 'unable to connect to server response1.) make use of the optional parameters $s_helo, and $s_first, set the 2nd one to -12.) try blat.exe to see, if it can do SMTP to that server successfully. Included with BLAT.EXE package is a BLAT.DLL (iirc), that one (with fileinstall() func) is how I coded to send email from autoit, before _INetSmtpMail() was improved quite a time ago.Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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