AlmarM Posted February 5, 2009 Posted February 5, 2009 Hi, Im trying to use _INetSmtpMail but it keeps failling with error '4'. @ERROR = 4 - Unable to create socket Here's what im using: #include <INet.au3> $s_Server = "smtp.live.com" $s_FromName = "AlmarM" $s_FromAddress = "worker1@live.nl" $s_ToAddress = "worker2@live.nl" $s_Subject = "Test" Dim $s_Body[4] $s_Body[0] = "Test1" $s_Body[1] = "Test2" $s_Body[2] = "Test3" $s_Body[3] = "Test4" $Response = _INetSmtpMail($s_Server, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $s_Body) $err = @error If $Response = 1 Then MsgBox(0, "", "Done") Else MsgBox(0, "", "Fail with: " & $err) EndIf How to fix this AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
rogdog Posted February 5, 2009 Posted February 5, 2009 I have tried the code using my work smtp settings and it doesn't seem work for me either. Sorry but can't see what we are doing wrong :-( My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
AlmarM Posted February 5, 2009 Author Posted February 5, 2009 I dont think im doing something wrong, mayby its the connection... What could it be? AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
rogdog Posted February 6, 2009 Posted February 6, 2009 Hi AlmarM, Just had another play with _INetSmtpMail() and got a bit further. I realised that my antivirus software (McAfee) is set to block smtp traffic by default. However, once I removed the block I received error message 50 instead of 4 @ERROR = 5x - Cannot open SMTP session. x indicates the index number of last command issued to the SMTP server. It would be worth you checking any antivirus/firewall products you have that might be blocking the smtp connection My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
Yorn Posted February 6, 2009 Posted February 6, 2009 Also, check with your ISP to verify they do not block SMTP traffic as well.
AlmarM Posted February 6, 2009 Author Posted February 6, 2009 Also, check with your ISP to verify they do not block SMTP traffic as well.How do I check it?AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
AlmarM Posted February 6, 2009 Author Posted February 6, 2009 (edited) Hi AlmarM,Just had another play with _INetSmtpMail() and got a bit further.I realised that my antivirus software (McAfee) is set to block smtp traffic by default. However, once I removed the block I received error message 50 instead of 4 @ERROR = 5x - Cannot open SMTP session. x indicates the index number of last command issued to the SMTP server.It would be worth you checking any antivirus/firewall products you have that might be blocking the smtp connectionOh my Firewall is down and I dont have any anti-virus installed.AlmarM Edited February 6, 2009 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
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