evil_dave Posted October 26, 2006 Posted October 26, 2006 Hiya, i have having a problem with a smal script i have: global $s_SmtpServer = "192.168.1.2" [This is the internal address of my SMTP server, which works fine through telnet on port 25] global $s_FromName = "My Name" global $s_FromAddress = "email@here.com" global $s_ToAddress = "email@here.com" global $s_Subject = "MySubject" Func _EmailLog($report) Dim $as_Body[1] $as_Body[0] = "$report" $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) $err = @error If $Response = 1 Then FileWriteLine($Name_Of_Log_File, @HOUR & ":" & @MIN & ":" & @SEC & " " & @MDAY & "/" & @MON & "/" & @YEAR & ": Sucess: Report Email Sent OK" & @CRLF) Else FileWriteLine($Name_Of_Log_File, @HOUR & ":" & @MIN & ":" & @SEC & " " & @MDAY & "/" & @MON & "/" & @YEAR & ": Error: Could not send report email: " & $err & @CRLF) EndIf EndFunc _EmailLog("text to go in email") The error i'm getting in my little log file is: Error: Could not send report email: 50 (50 being the error code) It shows in the helpfile that: @ERROR = 5x - Cannot open SMTP session. x indicates the index number of last command issued to the SMTP server. however i'm not sure how to correct this. can anyone have any thought? any help would be very welcome. Thanks for your time, David
AzKay Posted October 26, 2006 Posted October 26, 2006 Cant you just use localhost? # MY LOVE FOR YOU... IS LIKE A TRUCK- #
Bones8185 Posted October 26, 2006 Posted October 26, 2006 help file...Smtp server the eMail is to be sent though May be either alpha or a numeric IP address. In order to fight spam, many ISPs require this to be their server. eg "smtp.ispdomain.com", "mail.ispdomain.com" or "192.168.1.1"might try one of the ISPdomain ones... just my 2cents, although I wouldn't know how to help... I'm adding to the thread because I constantly keep getting "@ERROR = 4 - Unable to create socket". and I have know Idea what that is. I'm in the same boat. any one willing to save the newB'sthanx FileMove(".\Bones8185.newB", ".\Bones8185.adv")
AzKay Posted October 26, 2006 Posted October 26, 2006 He is using his own smtp server, Not an isp. # MY LOVE FOR YOU... IS LIKE A TRUCK- #
evil_dave Posted October 26, 2006 Author Posted October 26, 2006 Hiya, thanks for the replys. I cannot use localhost, in answer to your question because i do not have SMTP installed on my local computer. I have a Windows Server 2003 Standard which is at 192.168.1.2 which is why i use this IP. This email will not be going to the outside, only for internal use, so spam etc is not a problem. I've still not had any luck, so any more thoughts\ideas are very welcome. Bones8185: your most likey getting a socket error because somthing else is bound to the port its trying to use. Check your not using a firewall which is blocking your connectiom attempt. Also check what ports are in use on your machine by going Start > Run > type 'cmd' > click 'OK' > type 'netstat -a' It will show you all current connections and ports in use. Thanks for your time, David.
Rad Posted October 27, 2006 Posted October 27, 2006 When I do netstat -a a window comes up and has about 20 lines or so of TCP ... But it closes instantly I dont need to fix anything but why is it closing once the list is complete? (unless its just crashing while its being created...)
AzKay Posted October 27, 2006 Posted October 27, 2006 When I do netstat -a a window comes up and has about 20 lines or so of TCP ...But it closes instantlyI dont need to fix anything but why is it closing once the list is complete? (unless its just crashing while its being created...)Youve prolly got a virus thingo. Ive got it too, It replaces your stuff with corrupt ones, Try netstat.exe -a # MY LOVE FOR YOU... IS LIKE A TRUCK- #
Developers Jos Posted October 27, 2006 Developers Posted October 27, 2006 When I do netstat -a a window comes up and has about 20 lines or so of TCP ...But it closes instantlyI dont need to fix anything but why is it closing once the list is complete? (unless its just crashing while its being created...)Are you running it from the command prompt or from the Run window ?Youve prolly got a virus thingo. Ive got it too, It replaces your stuff with corrupt ones, Try netstat.exe -a are you sure ? 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.
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