SumTingWong Posted December 21, 2004 Posted December 21, 2004 (edited) Here's an example of how you can use Larry's TCP functions. You need AU3Xtra.dll of course and latest beta. Watch out for line wraps... See version 0.00000002 below! EDIT1: added @CRLF to the QUIT command Edited December 21, 2004 by pacman
sykes Posted December 21, 2004 Posted December 21, 2004 Very slick pacman ... works like a charm We have enough youth. How about a fountain of SMART?
SumTingWong Posted December 21, 2004 Author Posted December 21, 2004 (edited) Version 0.00000002 - Added checks and balances based on server responses and return 1 if message sent and 0 if message not sent - You can now send to multiple recipients by separating their email addresses with a comma in the recipient list. Again, watch out for line wraps because of my multi-level if/then/else nests. See my latest post for updated version. Edited May 23, 2005 by SumTingWong
Spaghetti prog Posted December 21, 2004 Posted December 21, 2004 file attachment feature would be great ! goto is evil
Developers Jos Posted December 21, 2004 Developers Posted December 21, 2004 file attachment feature would be great !<{POST_SNAPBACK}>yea, you will only have do a BASE64 conversion for the files to be attached first. :"> 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.Â
steve8tch Posted December 21, 2004 Posted December 21, 2004 I'm going to study that code above - just to learn how the dllcall and socket stuff works - what an amazing bit of code !!! You should include it in the help file as a real life tcp connect example. Well done - brilliant .. (recently I have been fileinstalling bmail and sending email with 3 lines of code!! - it works but I didn't learn anything by doing it. :"> )
this-is-me Posted December 21, 2004 Posted December 21, 2004 (edited) Pacman, I know this is a hard thing to ask, but could you present some sample code on how to set up a SIMPLE webserver with the tcp stuff? EDIT: Nevermind the previous question, I am going to try making it myself. It looks like one of the simplest things to do. Edited December 22, 2004 by this-is-me Who else would I be?
this-is-me Posted December 22, 2004 Posted December 22, 2004 Yea, It is for my personal use only, so only one connection is enough (me). I intend to do an extremely simple page that can be accessed by my phone with wap and control certain simple things on my system. I know I am opening myself up for a good buffer overflow here, but I think I will be OK since I will only use it a little. Who else would I be?
SumTingWong Posted December 22, 2004 Author Posted December 22, 2004 A problem with adding file attachments using AutoIT is that fact that it doesn't support binary files. Can't do a BASE64 conversion if you can't read the file in the first place. @this-is-me - to get you on your way:Disclaimer: this code is converted from a VB function by Francesco BalenaDim $s $s = _HTMLEncode("This is a "" & 5 is > 2 or 2 is < 5") MsgBox(4096,'debug:' , '$s:' & $s);### Debug MSGBOX Func _HTMLEncode($sText) Local $nASCII Local $sReplace Local $n For $n = StringLen($sText) To 1 Step -1 $nASCII = Asc(StringMid($sText, $n, 1)) Select Case $nASCII = 32 $sReplace = " " Case $nASCII = 34 $sReplace= """ Case $nASCII = 38 $sReplace = "&" Case $nASCII = 60 $sReplace = "<" Case $nASCII = 62 $sReplace = ">" Case $nASCII >= 32 And $nASCII <= 127 ; other alphanumeric chars Case Else $sReplace = "&#" & String($nASCII) & ";" EndSelect If StringLen($sReplace) Then $sText = StringLeft($sText, $n-1) & $sReplace & StringMid($sText, $n+1) $sReplace = "" EndIf Next Return $sText EndFunc
JSThePatriot Posted May 23, 2005 Posted May 23, 2005 I am not sure that I am doing anything wrong, but I am having trouble. _SendSMTPMail() doesnt seem to work, but it doesnt give any errors?? Could you explain the debug box? (What do different numbers mean?)I have every field filled in properly. I send the email and the program terminates so I know that it works but I never recieve the email .My code:expandcollapse popup;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;---*** Begin Declarations ***--- ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Dim $oIP, $oPT, $oPW;Old Values Dim $nIP, $nPT, $nPW;New Values Dim $eAddyTo, $eAddyFrom, $serverIP;Email Addresses/Server IP Dim $eSubject, $eBody;Email Subject, Body Dim $eDebug;Email Debug variable. ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;---*** Main Program Body ***--- ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;Make IPSend Run on startup. If Not(RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "IPSend.exe")) Then RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "IPSend.exe", "REG_SZ", @ScriptFullPath) EndIF ;Make sure VNC Server is running. If Not(ProcessExists("winvnc.exe")) Then Run("C:\Program Files\UltraVNC\winvnc.exe", "C:\Program Files\UltraVNC\") EndIf ;Set all variables from INI file. $oIP = INIRead("ipsend.sec", "VNC Info", "oIP", "") $oPT = INIRead("ipsend.sec", "VNC Info", "oPT", "") $oPW = INIRead("ipsend.sec", "VNC Info", "oPW", "") $eAddyTo = INIRead("ipsend.sec", "eAddress", "eAddyTo", "") $eAddyFrom = INIRead("ipsend.sec", "eAddress", "eAddyFrom", "") $serverIP = INIRead("ipsend.sec", "eAddress", "serverIP", "") $eSubject = INIRead("ipsend.sec", "eMail", "eSubject", "") $eBody = INIRead("ipsend.sec", "eMail", "eBody", "") ;Set all the New Values $nIP = _GetIP() $nPT = _GetVNCPort() $nPW = _GetVNCPass() ;If any new values are different than old values then send them off in an email. If ($oIP <> $nIP) OR ($oPT <> $nPT) OR ($oPW <> $nPW) Then INIWrite("ipsend.sec", "VNC Info", "oIP", $nIP) INIWrite("ipsend.sec", "VNC Info", "oPT", $nPT) INIWrite("ipsend.sec", "VNC Info", "oPW", $nPW) $eDebug = _SendSMTPMail($serverIP, $eAddyFrom, $eAddyTo, $eSubject, $eBody) MsgBox(0, "_SendSMTPMail() Debug", "Debug: " & $eDebug) EndIfLet me know.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
jbarr Posted May 23, 2005 Posted May 23, 2005 This is very interesting. I came from the WinBatch world, but the company I now work for does not use WinBatch, so I decided to throw together an AutoIT solution. I just implemented an AutoIT application that leverages the Postie email program. It's kinda kludgy, but it is very stable, and works well. Basically, I needed an automated solution that would look for files in a directory and email those files as attachments to recipients defined within the files. The files are .CSV data files and the first line of each file contains the recipient's email address. these files are generated by SAP and translated into .CSV format using the GENTRAN EDI translator. The resulting files get dropped into a work directory, and a process executes every few minutes that looks for and processes any files. Here's the basic flow: 1. Start with a "working" directory. 2. Build a list of all files in that directory to process. This part is critical because it gives me a "snapshot" of the files at execution time. That way, any files that may drop into the directory during execution get will processed on the next execution. Everything needs to process, and everything needs to be accounted for. 3. Loop through the file list and process each file as follows: 3.1 Read the first line of the file. The first line contains the recipient's email address. 3.2 Build a complete Postie command string and write it to a batch file in a work directory. The postie command includes the to, from, subject, host, etc. The file being read is included in the Postie command string as an attachment. Almost all parameters are static except for the filename and the recipient. The static parameters are read from a .ini file for easy maintenance. 3.3 Execute the Postie batch file. This actually sends the file. 3.4 Move the data file and the Postie batch files to archive directories. Remember, I am only moving the files in the original file list as well as associated batch files. Any new files will get processed on the next run. 4. loop back to get next filename to process. Misc: I revise all filenames to include date and time stamps based on execution time. This aids in tracability. I added lines in the code to write to log a file at critical points to help with occasional troubleshooting. My only real problem is that I don't like the idea of having to jump out to execute Postie. At that point, I lose some control over execution status. Yes, Postie can return an error level that is handled by AutoIT, but it's a success / fail status. I cannot tell what errors actually occur if any. Fortunatly, I retain archives of the generated batch files so I can troubleshoot later if needed. But a full AutoIT solution would be much nicer! I can upload the sources if you want... Visit Jim's Tips for lots of cool tips on Gmail, SageTV, PDA's, and whatever else interests me!
SumTingWong Posted May 23, 2005 Author Posted May 23, 2005 (edited) Since you dug this up from the archive, I just couldn't resist updating it for the latest beta. JS, hopefully the code is easier to read and troubleshoot without all the DllCall stuff. expandcollapse popupOpt("MustDeclareVars", 1) Dim $i If _SendSMTPMail("localhost", _ "me@host.com", _ "youfirstbuddy@host.com, yoursecondbuddy@host.com, yourthirdbuddy@host.com", _ "Test email", _ "This is a test email") Then MsgBox(0, "_SendSMTP", "Message sent!") EndIf Func _SendSMTPMail($sServer, $sSender, $sRecipients, $sSubject, $sBody) Local $hSocket Local $sData Local $aRcptList Local $nRcptOK = 0 Local $bSent = False Local $n ; Start TCP services If Not TCPStartup() Then Return False ; Connect to SMTP server $hSocket = TCPConnect(TCPNameToIP($sServer), 25) If $hSocket <> -1 Then Sleep(100) ; Read 220 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "220" Then Sleep(100) $sData = "HELO " & @ComputerName & @CRLF ; Send HELO to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then Sleep(100) $sData = "MAIL FROM: <" & $sSender & ">" & @CRLF ; Send MAIL FROM command to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then $aRcptList = StringSplit($sRecipients, ",") For $n = 1 To $aRcptList[0] Sleep(100) $sData = "RCPT TO: <" & StringStripWS($aRcptList[$n], 8) & ">" & @CRLF ; Send RCPT TO command to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then $nRcptOK += 1 EndIf Next ; Continue if at least 1 recipient was accepted If $nRcptOK > 0 Then Sleep(100) $sData = "DATA" & @CRLF ; Send DATA command to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 354 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "354" Then Sleep(100) $sData = StringFormat("To: %s\r\nFrom: %s\r\n" & _ "Subject: %s\r\n" & _ "Date: %02d/%02d/%d %02d:%02d:%02d\r\n", _ $sRecipients, $sSender, $sSubject, _ @MDAY, @MON, @YEAR, @HOUR, @MIN, @SEC) ; Send message HEADER If TCPSend($hSocket, $sData) > 0 Then Sleep(100) $sData = $sBody & @CRLF ; Send message BODY If TCPSend($hSocket, $sData) > 0 Then Sleep(100) $sData = @CRLF & "." & @CRLF ; Send end of message indicator If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then $bSent = True EndIf; Send end of message indicator EndIf; Send message BODY EndIf; Send message HEADER EndIf; Receive 354 response from server EndIf; Send DATA command to server EndIf; Continue if at least 1 recipient was accepted EndIf; Receive 250 response from server EndIf; Send MAIL FROM command to server EndIf; Receive 250 response from server EndIf; Send HELO to server EndIf; Read 220 response from server ; Close TCP socket TCPCloseSocket($hSocket) EndIf ; Shutdown TCP services TCPShutdown() Return $bSent EndFunc Edited May 23, 2005 by SumTingWong
JSThePatriot Posted May 24, 2005 Posted May 24, 2005 Since you dug this up from the archive, I just couldn't resist updating it for the latest beta. JS, hopefully the code is easier to read and troubleshoot without all the DllCall stuff.expandcollapse popupOpt("MustDeclareVars", 1) Dim $i If _SendSMTPMail("localhost", _ "me@host.com", _ "youfirstbuddy@host.com, yoursecondbuddy@host.com, yourthirdbuddy@host.com", _ "Test email", _ "This is a test email") Then MsgBox(0, "_SendSMTP", "Message sent!") EndIf Func _SendSMTPMail($sServer, $sSender, $sRecipients, $sSubject, $sBody) Local $hSocket Local $sData Local $aRcptList Local $nRcptOK = 0 Local $bSent = False Local $n ; Start TCP services If Not TCPStartup() Then Return False ; Connect to SMTP server $hSocket = TCPConnect(TCPNameToIP($sServer), 25) If $hSocket <> -1 Then Sleep(100) ; Read 220 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "220" Then Sleep(100) $sData = "HELO " & @ComputerName & @CRLF ; Send HELO to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then Sleep(100) $sData = "MAIL FROM: <" & $sSender & ">" & @CRLF ; Send MAIL FROM command to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then $aRcptList = StringSplit($sRecipients, ",") For $n = 1 To $aRcptList[0] Sleep(100) $sData = "RCPT TO: <" & StringStripWS($aRcptList[$n], 8) & ">" & @CRLF ; Send RCPT TO command to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then $nRcptOK += 1 EndIf Next ; Continue if at least 1 recipient was accepted If $nRcptOK > 0 Then Sleep(100) $sData = "DATA" & @CRLF ; Send DATA command to server If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 354 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "354" Then Sleep(100) $sData = StringFormat("To: %s\r\nFrom: %s\r\n" & _ "Subject: %s\r\n" & _ "Date: %02d/%02d/%d %02d:%02d:%02d\r\n", _ $sRecipients, $sSender, $sSubject, _ @MDAY, @MON, @YEAR, @HOUR, @MIN, @SEC) ; Send message HEADER If TCPSend($hSocket, $sData) > 0 Then Sleep(100) $sData = $sBody & @CRLF ; Send message BODY If TCPSend($hSocket, $sData) > 0 Then Sleep(100) $sData = @CRLF & "." & @CRLF ; Send end of message indicator If TCPSend($hSocket, $sData) > 0 Then Sleep(100) ; Receive 250 response from server $sData = TCPRecv($hSocket, 1024) If StringLeft($sData, 3) = "250" Then $bSent = True EndIf; Send end of message indicator EndIf; Send message BODY EndIf; Send message HEADER EndIf; Receive 354 response from server EndIf; Send DATA command to server EndIf; Continue if at least 1 recipient was accepted EndIf; Receive 250 response from server EndIf; Send MAIL FROM command to server EndIf; Receive 250 response from server EndIf; Send HELO to server EndIf; Read 220 response from server ; Close TCP socket TCPCloseSocket($hSocket) EndIf ; Shutdown TCP services TCPShutdown() Return $bSent EndFunc<{POST_SNAPBACK}>I really appreciate the new code. I am trying to get my program into a full AutoIt solution. Hopefully I can get it working. Before when I was working on this I used BMail and VNCPWDump.exe now I have eliminated one of those and hopefully soon I will eliminate the other if I can ever figure out the C++ code and work it into AutoIt Code.Thanks Again,JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
JSThePatriot Posted May 24, 2005 Posted May 24, 2005 This is very interesting. I came from the WinBatch world, but the company I now work for does not use WinBatch, so I decided to throw together an AutoIT solution. I just implemented an AutoIT application that leverages the Postie email program. It's kinda kludgy, but it is very stable, and works well.Basically, I needed an automated solution that would look for files in a directory and email those files as attachments to recipients defined within the files. The files are .CSV data files and the first line of each file contains the recipient's email address. these files are generated by SAP and translated into .CSV format using the GENTRAN EDI translator. The resulting files get dropped into a work directory, and a process executes every few minutes that looks for and processes any files.Here's the basic flow:1. Start with a "working" directory.2. Build a list of all files in that directory to process. This part is critical because it gives me a "snapshot" of the files at execution time. That way, any files that may drop into the directory during execution get will processed on the next execution. Everything needs to process, and everything needs to be accounted for.3. Loop through the file list and process each file as follows:3.1 Read the first line of the file. The first line contains the recipient's email address.3.2 Build a complete Postie command string and write it to a batch file in a work directory. The postie command includes the to, from, subject, host, etc. The file being read is included in the Postie command string as an attachment. Almost all parameters are static except for the filename and the recipient. The static parameters are read from a .ini file for easy maintenance.3.3 Execute the Postie batch file. This actually sends the file.3.4 Move the data file and the Postie batch files to archive directories. Remember, I am only moving the files in the original file list as well as associated batch files. Any new files will get processed on the next run.4. loop back to get next filename to process.Misc:I revise all filenames to include date and time stamps based on execution time. This aids in tracability.I added lines in the code to write to log a file at critical points to help with occasional troubleshooting.My only real problem is that I don't like the idea of having to jump out to execute Postie. At that point, I lose some control over execution status. Yes, Postie can return an error level that is handled by AutoIT, but it's a success / fail status. I cannot tell what errors actually occur if any. Fortunatly, I retain archives of the generated batch files so I can troubleshoot later if needed.But a full AutoIT solution would be much nicer!I can upload the sources if you want...<{POST_SNAPBACK}>I am not sure that this _SendSMTPMail() will send attachments therefore this probably isnt the exact AutoIt solution you are looking for. I will comment more in the morning on an Edit line for this post you have made. I would agree that you should use as much of a full AutoIt solution as possible. Possibly using another email program.Have you created the complete rest of the application?Why are you still using batch files or is that from the postie? (What is a postie?)Just a couple of things off the top of my head. I will get more into it tomorrow when I can think about it more clearly :-P For now I need sleep.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
SumTingWong Posted May 24, 2005 Author Posted May 24, 2005 This UDF is only useful for small text messages. If you want to send large messages and attachments then you are better off sticking with external mail senders.
Clever1mba Posted June 4, 2005 Posted June 4, 2005 (edited) hey its not working on my machine ur code have problem i think and it also not displaying any status i made few changes in ur code help me to display mail status or open like cmd or gui $aRcptList = "snip"$sSender = "snip"$sServer = "mx4.mail.yahoo.com"$sSubject = "TEST MAIL"TCPStartup() $hSocket = TCPConnect(TCPNameToIP($sServer), 25)If $hSocket <> -1 ThenSleep(100)$sData = TCPRecv($hSocket, 1024)Â If StringLeft($sData, 3) = "220" ThenSleep(100)$sData = "HELO " & @ComputerName & @CRLFÂ If TCPSend($hSocket, $sData) > 0 ThenSleep(100)$sData = TCPRecv($hSocket, 1024)If StringLeft($sData, 3) = "250" ThenSleep(100)$sData = "MAIL FROM: <" & $sSender & ">" & @CRLFÂ Â If TCPSend($hSocket, $sData) > 0 ThenSleep(100)$sData = TCPRecv($hSocket, 1024)If StringLeft($sData, 3) = "250" ThenSleep(100)$sData = "RCPT TO: <" & $aRcptList & ">" & @CRLFÂ Â If TCPSend($hSocket, $sData) > 0 ThenSleep(100)$sData = TCPRecv($hSocket, 1024)If StringLeft($sData, 3) = "250" ThenSleep(100)$sData = "DATA" & @CRLFÂ Â If TCPSend($hSocket, $sData) > 0 ThenSleep(100)$sData = TCPRecv($hSocket, 1024)If StringLeft($sData, 3) = "354" ThenSleep(100)$sData = StringFormat("To: %srnFrom: %srn" & _ "Subject: %srn" & _ "Date: %02d/%02d/%d %02d:%02d:%02drn", _$aRcptList, $sSender, $sSubject, _ @MDAY, @MON, @YEAR, @HOUR, @MIN, @SEC) If TCPSend($hSocket, $sData) > 0 ThenSleep(100)$sData =Â @CRLFIf TCPSend($hSocket, $sData) > 0 ThenSleep(100)$sData = @CRLF & "." & @CRLFIf TCPSend($hSocket, $sData) > 0 ThenSleep(100)$sData = TCPRecv($hSocket, 1024)If StringLeft($sData, 3) = "250" ThenSleep(100)EndIfEndIfEndIfEndIfEndIfEndIfEndIfEndIfEndIfEndIfEndIfEndIfEndIfEndIf Edited November 8, 2012 by Melba23
JSThePatriot Posted June 4, 2005 Posted June 4, 2005 hey its not working on my machine ur code have problem i think and it also not displaying any status i made few changes in ur code help me to display mail status or open like cmd or gui<{POST_SNAPBACK}>I have yet to get it working properly as well. It doesnt give me any errors, but I never get any of the test messages I have sent. I may just script something for bmail.exe like I did before.JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008Â Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
SumTingWong Posted June 4, 2005 Author Posted June 4, 2005 I have yet to get it working properly as well. It doesnt give me any errors, but I never get any of the test messages I have sent. I may just script something for bmail.exe like I did before.JS<{POST_SNAPBACK}>Have you tried manually sending a message on your SMTP server?Follow these steps:1. telnet <yoursmtpserver> 25e.g: telnet mailserver 25If your SMTP server is working correctly, you should see a welcome message.2. send HELO <yourcomputername>e.g: HELO mypc01You should get a reply beginning with 250 from the server. If you don't get anything back, it could be that you need to turn on local echo.3. send MAIL FROM: <senderemailaddress>e.g: MAIL FROM: <me@mydomain.com>Unlike steps 1 and 2, <senderemailaddress> must be enclosed inside <>. You should get a reply beginning with 2504. send RCPT TO: <recipientemailaddress>e.g: RCPT TO: <you@yourdomain.com><recipientemailaddress> must be enclosed inside <>. You should get a reply beginning with 2505. send DATAe.g: DATAYou should get a reply beginning with 3546. send To: <recipient>e.g: To: you@yourdomain.com7. send From: <sender>e.g: From: me@mydomain.com8. send Subject: <subject>e.g: Subject: This is a test9. send Date: <date>e.g: Date: 04/06/2005 12:23:4510. send your message11. at the end of your message send a RETURN and a FULLSTOP and another RETURN. You should get a reply beginning with 250 to indicate that your message has been sent.It goes without saying that each time you send a command, you should press RETURN. Most SMTP mail servers, if they are correctly configured, will not relay messages so you must enter a valid sender email address.These are the exact steps that the UDF carries out so if you can do it manually, then the UDF should work.
Clever1mba Posted June 5, 2005 Posted June 5, 2005 helo okay i m working on smtp when it ready for work then i will share with u .
SumTingWong Posted June 5, 2005 Author Posted June 5, 2005 helo okay i m working on smtp when it ready for work then i will share with u .<{POST_SNAPBACK}>I got your PM but thought I would post my reply here in case other people have the same problem as you.If you don't get a welcome message when you telnet your smtp server on port 25 then either it's not working or you are telnetting an incorrect server address.If you get a welcome message but no response from the server when you send the first HELO command then you need to turn on telnet localecho. Assuming you are using the built-in Windows telnet client, do:1. Start, Run, telnet2. At the Microsoft Telnet prompt, type in set localecho3. ThenquitNow try using telnet again.
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