Re: TCP Connect code for SMTP transaction

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 57627
interpreted = N
texte = Colin Sidwell wrote: > The emailer application in OSX is too primitive, e.g. unless you look in the > log or problem email folder, you don't know if your message bounced. The [sendmail] context is only intended to connect to a real e-mail server, which will then handle the queuing of the messages for eventual delivery. It is not intended to be used to directly send messages. If you are not familiar with how to use the OSX SMTP server (which should be sendmail itself if I am not mistaken), perhaps you should learn to use the system tool correctly, rather than trying to hack up something poor. Bounced messages will be reported to the envelope FROM: address; if this isn't a real mailbox, you won't get bounce messages. If you are concerned about people typing in a non-working e-mail address, you can do ask them to key it in twice (this usually gets them to think before they type). Or if you are dealing with a high-value transaction, you e-mail them a link to continue the transaction, rather than completing the transaction with the initial e-mail. You can also do some simple validation of the e-mail address using either JavaScript or the [grep] context. > > I am experimenting with writing my own, here's what I've got so far- > > [TCPConnect host=[server]&port=25] > [TCPSend end=%0D%0A]HELO [hello][UnURL]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]MAIL FROM:[from][UnURL]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]RCPT TO:[to][UnURL]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]DATA[UnURL]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]X-Mailer: Ideal TCP Connector This won't work in general, as I said, since you have no way of waiting for the prompts from the remote server. A SMTP transaction is a conversation between two systems; the SMTP software I use would cut your code off because you start "talking" before I have answered your initial greeting. The biggest mistake people make when posting questions to a list is to describe what they [think they] need to do, rather than describe what they actually want to accomplish. You've already decided you need a SMTP client, when the problem you are trying to solve is something completely different... John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: TCP Connect code for SMTP transaction ( John Peacock 2004)
  2. Re: TCP Connect code for SMTP transaction ( Colin Sidwell 2004)
  3. Re: TCP Connect code for SMTP transaction ( John Peacock 2004)
  4. Re: TCP Connect code for SMTP transaction ( Colin Sidwell 2004)
  5. Re: TCP Connect code for SMTP transaction ( Colin Sidwell 2004)
  6. Re: TCP Connect code for SMTP transaction ( Donovan Brooke 2004)
  7. Re: TCP Connect code for SMTP transaction ( John Peacock 2004)
  8. Re: TCP Connect code for SMTP transaction ( "Nitai @ ComputerOil" 2004)
  9. Re: TCP Connect code for SMTP transaction ( Colin Sidwell 2004)
  10. Re: TCP Connect code for SMTP transaction ( John Peacock 2004)
  11. TCP Connect code for SMTP transaction ( Colin Sidwell 2004)
Colin Sidwell wrote: > The emailer application in OSX is too primitive, e.g. unless you look in the > log or problem email folder, you don't know if your message bounced. The [sendmail] context is only intended to connect to a real e-mail server, which will then handle the queuing of the messages for eventual delivery. It is not intended to be used to directly send messages. If you are not familiar with how to use the OSX SMTP server (which should be sendmail itself if I am not mistaken), perhaps you should learn to use the system tool correctly, rather than trying to hack up something poor. Bounced messages will be reported to the envelope FROM: address; if this isn't a real mailbox, you won't get bounce messages. If you are concerned about people typing in a non-working e-mail address, you can do ask them to key it in twice (this usually gets them to think before they type). Or if you are dealing with a high-value transaction, you e-mail them a link to continue the transaction, rather than completing the transaction with the initial e-mail. You can also do some simple validation of the e-mail address using either JavaScript or the [grep] context. > > I am experimenting with writing my own, here's what I've got so far- > > [TCPConnect host=[server]&port=25] > [TCPSend end=%0D%0A]HELO [hello][unurl]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]MAIL FROM:[from][unurl]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]RCPT TO:[to][unurl]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]DATA[unurl]%0D%0A[/UnURL][/TCPSend] > [TCPSend end=%0D%0A]X-Mailer: Ideal TCP Connector This won't work in general, as I said, since you have no way of waiting for the prompts from the remote server. A SMTP transaction is a conversation between two systems; the SMTP software I use would cut your code off because you start "talking" before I have answered your initial greeting. The biggest mistake people make when posting questions to a list is to describe what they [think they] need to do, rather than describe what they actually want to accomplish. You've already decided you need a SMTP client, when the problem you are trying to solve is something completely different... John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748 ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Nested tags count question (1997) OK, here goes... (1997) Categories (2000) major search problem (1998) WebCat2b13 Command Reference Doc error (1997) possible, WebCat2.0 and checkboxes-restated (1997) Protect (1997) international time (1997) Search or delete (or date or time) has bugs ... (1998) international time (1997) Re(6): Small Bug: ErrorLog.txt/[FORMVARIABLES]/[ORDERFILE] (1998) Shipping charges (1998) process SSI (1998) Possible Macv2.1b2 Merge Bug (1997) Re:[ShowIf] and empty fields (1997) Practice runs ? (1997) Nav. 4 probs with cart (1997) Emailer setup (1997) cc auth with [purchase] (1998) Image maps/Webcat (1997)