[quote user="alien9882"]Hi, I am new to use mercury.
I wanna use Gmail to send email so that I configured the SMTP client.The thing is that when I tested it by PHP script and looked at the display message on Mercury Core process window, strange things happened!
Here is my My simple PHP script:
$headers = 'From: charlie.trial@gmail.com';
mail('charlie.trial@gmail.com', 'Mercury test mail', 'test email', $headers)
The above one worked perfectly. But if I changed header into this:
$headers = 'From: <charlie.trial@gmail.com><charlie.trial>';</charlie.trial>@gmail.com>
Problem occurred! Below is the log
12:56:58 Job MG000007: from <charlie.trial@gmail.com {non-local}
To: charlie.trial@gmail.com {non-local} (job MO000008) - OK
The RFC 2822 body header From: does not require the <> unless using a personal name while the SMTP MAIL FROM: does. In any case use session logging in MercuryS to see exactly what is being sent to MercuryS from your PHP application. Here's a sample session log. Note the form of the highlighted MAIL FROM: and From: addresses.
14:21:10.265: Connection from 192.168.1.5, Fri Oct 24 14:21:10 2008<lf>
14:21:10.265: << 220 tstephenson.com ESMTP server ready.<cr><lf>
14:21:10.281: >> EHLO [192.168.1.5]<cr><lf>
14:21:10.281: << 250-tstephenson.com Hello [192.168.1.5]; ESMTPs are:<cr><lf>250-TIME<cr><lf>
14:21:10.281: << 250-SIZE 0<cr><lf>
14:21:10.281: << 250-AUTH CRAM-MD5 LOGIN<cr><lf>
14:21:10.281: << 250-AUTH=LOGIN<cr><lf>
14:21:10.281: << 250-STARTTLS<cr><lf>
14:21:10.281: << 250 HELP<cr><lf>
14:21:10.453: >> AUTH CRAM-MD5<cr><lf>
14:21:10.453: << 334 PDPDg0Mzk3NDUzLjM0NkB0c3RlRIcGhlbnNvbi5jb20+<cr><lf>
14:21:10.453: >> dXNElciA4YTA2NTU0OWVlODDVjZMZMZmU2YjFEhZTJhMjE3MGQ3OWI4MA==<cr><lf>
14:21:10.453: << 235 Authentication successful.<cr><lf>
14:21:10.453: >> RSET<cr><lf>
14:21:10.453: << 250 Command processed OK.<cr><lf>
14:21:10.453: >> MAIL FROM:<thomas@tstephenson.com><cr><lf>14:21:10.453: << 250 Sender OK - send RCPTs.<cr><lf>
14:21:10.453: >> RCPT TO:<support@tstephenson.com><cr><lf>
14:21:10.468: << 250 Recipient OK - send RCPT or DATA.<cr><lf>
14:21:10.468: >> DATA<cr><lf>
14:21:10.468: << 354 OK, send data, end with CRLF.CRLF<cr><lf>
14:21:10.468: >> Date: Fri, 24 Oct 2008 14:21:10 -0700<cr><lf>
14:21:10.468: >> From: Thomas Stephenson <thomas@tstephenson.com><cr><lf>14:21:10.468: >> To: support@tstephenson.com<cr><lf>
14:21:10.468: >> Subject: Test of AUTH.<cr><lf>
14:21:10.468: >> Message-Id: <20081024142101.6DA6.5E4A2843@tstephenson.com><cr><lf>
14:21:10.468: >> MIME-Version: 1.0<cr><lf>
14:21:10.468: >> Content-Type: text/plain; charset="US-ASCII"<cr><lf>
14:21:10.468: >> Content-Transfer-Encoding: 7bit<cr><lf>
14:21:10.468: >> X-Mailer: Becky! ver. 2.48.01 [en]<cr><lf>
14:21:10.468: >> <cr><lf>
14:21:10.468: >> This a a test of becky authorization.<cr><lf>
14:21:10.468: >> <cr><lf>
14:21:10.468: >> <cr><lf>
14:21:10.468: >> <cr><lf>
14:21:10.468: >> -- <cr><lf>
14:21:10.468: >> Thomas Stephenson <thomas@tstephenson.com><cr><lf>
14:21:10.468: >> <cr><lf>
14:21:10.625: >> .<cr><lf>
14:21:10.625: << 250 Data received OK.<cr><lf>
14:21:10.656: >> QUIT<cr><lf>
14:21:10.656: << 221 tstephenson.com Service closing channel.<cr><lf>
14:21:10.656: --- Connection closed normally at Fri Oct 24 14:21:10 2008. ---
14:21:10.656:
The symbol '>' is removed so that the error occured. Anyone encountered this problem? I use version 4.5 in Xampp package.
You might have to do a lot of configuration in Mercury, the XAMPP installer does not do a very good job of this. Make sure you are running Mercury v4.62 as well. Has nothing to do with this specific problem but it really needs to be setup properly. Probably cannot use MercuryE to send mail unless you have a fixed IP address and registered domain name so you need to convert to MercuryC and use your ISP's SMTP host for relaying.
[/quote]
<blockquote>[quote user="alien9882"]Hi, I am new to use mercury.
<p>
I wanna use Gmail to send email so that I configured the SMTP client.The thing is that when I tested it by PHP script and looked at the display message on Mercury Core process window, strange things happened!
Here is my My simple PHP script:
$headers = 'From: charlie.trial@gmail.com';
mail('charlie.trial@gmail.com', 'Mercury test mail', 'test email', $headers)</p></blockquote><blockquote><p>
The above one worked perfectly. But if I changed header into this:
$headers = 'From: <b>&lt;charlie.trial@gmail.com&gt;</b><charlie.trial@gmail.com>';</charlie.trial@gmail.com></p><p>Problem occurred! Below is the log
12:56:58 Job MG000007: <b>from &lt;charlie.trial@gmail.com</b> {non-local}
To: charlie.trial@gmail.com {non-local} (job MO000008) - OK</p></blockquote><p>The RFC 2822 body header From: does not require the &lt;&gt; unless using a personal name while the SMTP MAIL FROM: does. &nbsp; In any case use session logging in MercuryS to see exactly what is being sent to MercuryS from your PHP application.&nbsp; Here's a sample session log.&nbsp; Note the form of the highlighted MAIL FROM: and From: addresses.</p>14:21:10.265: Connection from 192.168.1.5, Fri Oct 24 14:21:10 2008&lt;lf&gt;
14:21:10.265: &lt;&lt; 220 tstephenson.com ESMTP server ready.&lt;cr&gt;&lt;lf&gt;
14:21:10.281: &gt;&gt; EHLO [192.168.1.5]&lt;cr&gt;&lt;lf&gt;
14:21:10.281: &lt;&lt; 250-tstephenson.com Hello [192.168.1.5]; ESMTPs are:&lt;cr&gt;&lt;lf&gt;250-TIME&lt;cr&gt;&lt;lf&gt;
14:21:10.281: &lt;&lt; 250-SIZE 0&lt;cr&gt;&lt;lf&gt;
14:21:10.281: &lt;&lt; 250-AUTH CRAM-MD5 LOGIN&lt;cr&gt;&lt;lf&gt;
14:21:10.281: &lt;&lt; 250-AUTH=LOGIN&lt;cr&gt;&lt;lf&gt;
14:21:10.281: &lt;&lt; 250-STARTTLS&lt;cr&gt;&lt;lf&gt;
14:21:10.281: &lt;&lt; 250 HELP&lt;cr&gt;&lt;lf&gt;
14:21:10.453: &gt;&gt; AUTH CRAM-MD5&lt;cr&gt;&lt;lf&gt;
14:21:10.453: &lt;&lt; 334 PDPDg0Mzk3NDUzLjM0NkB0c3RlRIcGhlbnNvbi5jb20+&lt;cr&gt;&lt;lf&gt;
14:21:10.453: &gt;&gt; dXNElciA4YTA2NTU0OWVlODDVjZMZMZmU2YjFEhZTJhMjE3MGQ3OWI4MA==&lt;cr&gt;&lt;lf&gt;
14:21:10.453: &lt;&lt; 235 Authentication successful.&lt;cr&gt;&lt;lf&gt;
14:21:10.453: &gt;&gt; RSET&lt;cr&gt;&lt;lf&gt;
14:21:10.453: &lt;&lt; 250 Command processed OK.&lt;cr&gt;&lt;lf&gt;
<b>14:21:10.453: &gt;&gt; MAIL FROM:&lt;thomas@tstephenson.com&gt;&lt;cr&gt;&lt;lf&gt;</b>
14:21:10.453: &lt;&lt; 250 Sender OK - send RCPTs.&lt;cr&gt;&lt;lf&gt;
14:21:10.453: &gt;&gt; RCPT TO:&lt;support@tstephenson.com&gt;&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &lt;&lt; 250 Recipient OK - send RCPT or DATA.&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; DATA&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &lt;&lt; 354 OK, send data, end with CRLF.CRLF&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; Date: Fri, 24 Oct 2008 14:21:10 -0700&lt;cr&gt;&lt;lf&gt;
<b>14:21:10.468: &gt;&gt; From: Thomas Stephenson &lt;thomas@tstephenson.com&gt;&lt;cr&gt;&lt;lf&gt;</b>
14:21:10.468: &gt;&gt; To: support@tstephenson.com&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; Subject: Test of AUTH.&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; Message-Id: &lt;20081024142101.6DA6.5E4A2843@tstephenson.com&gt;&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; MIME-Version: 1.0&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; Content-Type: text/plain; charset="US-ASCII"&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; Content-Transfer-Encoding: 7bit&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; X-Mailer: Becky! ver. 2.48.01 [en]&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; This a a test of becky authorization.&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; -- &lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; Thomas Stephenson &lt;thomas@tstephenson.com&gt;&lt;cr&gt;&lt;lf&gt;
14:21:10.468: &gt;&gt; &lt;cr&gt;&lt;lf&gt;
14:21:10.625: &gt;&gt; .&lt;cr&gt;&lt;lf&gt;
14:21:10.625: &lt;&lt; 250 Data received OK.&lt;cr&gt;&lt;lf&gt;
14:21:10.656: &gt;&gt; QUIT&lt;cr&gt;&lt;lf&gt;
14:21:10.656: &lt;&lt; 221 tstephenson.com Service closing channel.&lt;cr&gt;&lt;lf&gt;
14:21:10.656: --- Connection closed normally at Fri Oct 24 14:21:10 2008. ---
14:21:10.656:
<blockquote><p>The symbol <b>'&gt;'</b> is removed so that the error occured. Anyone encountered this problem? I use version 4.5 in Xampp package. </p></blockquote><p>You might have to do a lot of configuration in Mercury, the XAMPP installer does not do a very good job of this.&nbsp; Make sure you are running Mercury v4.62 as well.&nbsp; Has nothing to do with this specific problem but it really needs to be setup properly.&nbsp; Probably cannot use MercuryE to send mail unless you have a fixed IP address and registered domain name so you need to convert to MercuryC and use your ISP's SMTP host for relaying.
</p><blockquote>[/quote]</blockquote>