How should I add a name to the from address?Not sure with your application but the application should allow for a separate MAIL FROM: address and From: address
<span><span>MAIL <p>FROM</p></span><span>:<</span><span>"Some Name" </span><span><</span><span>donotreply</span><span>@</span><span>mydomain</span><span>.</span><span>com</span><span>>></span></span>
<span><span>MAIL
</span></span>
FROM:<donotreply@mydomain.com>
Here's a session log showing a valid SMTP sending process. I've highlighted the connecting string with a valid domain name and the SMTP address strings. When your application can do this it's putting out a valid message.
Connect to 'scruznet.com', timeout 300.
15:04:13 >> 220 scruz.net ESMTP Sendmail 8.8.5/1.34 ready at Sat, 20 Jun 1998 15:04:14 -0700 (PDT)\0D\0A
15:04:13 << HELO thomas.lmms.lmco.com\0D\0A
15:04:13 >> 250 scruz.net Hello stephens.sj.scruznet.com [165.227.102.91], pleased to meet you\0D\0A
15:04:13 << MAIL FROM:<stephens@scruznet.com>\0D\0A
15:04:14 >> 250 <stephens@scruznet.com>... Sender ok\0D\0A
15:04:14 << RCPT TO:<stephens@scruznet.com>\0D\0A
15:04:14 >> 250 <stephens@scruznet.com>... Recipient ok\0D\0A
15:04:14 << DATA\0D\0A
15:04:14 >> 354 Enter mail, end with "." on a line by itself\0D\0A
15:04:14 << From: "Thomas Stephenson" <stephens@scruznet.com>\0D\0A
15:04:14 << To: stephens@scruznet.com\0D\0A
15:04:14 << Date: Sat, 20 Jun 1998 15:04:12 -0700\0D\0A
15:04:14 << MIME-Version: 1.0\0D\0A
15:04:14 << Content-type: text/plain; charset=US-ASCII\0D\0A
15:04:14 << Content-transfer-encoding: 7BIT\0D\0A
15:04:14 << Subject: test\0D\0A
15:04:14 << Priority: normal\0D\0A
15:04:14 << X-mailer: Pegasus Mail for Win32 (v3.01b)\0D\0A
15:04:14 << \0D\0A
15:04:14 << test message body\0D\0A
15:04:14 << \0D\0A
15:04:14 << .\0D\0A
15:04:15 >> 250 PAA08117 Message accepted for delivery\0D\0A
15:04:15 << QUIT\0D\0A
15:04:15 >> 221 scruz.net closing connection\0D\0A