Community Discussions and Support
PHPMailer with Mercury-Mailtransport

But I like to turn in  "Mercury SMTP Server -> Connection

control"   the parameter   "Only Authenticated SMTP

connections may relay mail" of ON!!

To got more security!

Is there a posibility in my script to put a "pasword" and a

"user" that Mercury understand it?

If port 25 of this system is available via the internet  and you do not turn off relaying and turn on strict relaying you will be running an open relay that the spammers will find in a few hours at most.  Once you turn off the relaying and set strict you can authorize relaying either through the ESMTP authorization or by allowing specific IP addresses to relay under connection control.  See the MercuryS help for details.

 

 

<blockquote><p>But I like to turn in  "<strong>Mercury SMTP Server -> Connection control</strong>"   the parameter   "<strong>Only Authenticated SMTP connections may relay mail</strong>" of <strong>ON</strong>!!</p><p>To got more security!</p><p>Is there a posibility in my script to put a "pasword" and a "user" that Mercury understand it?</p></blockquote><p>If port 25 of this system is available via the internet  and you do not turn off relaying and turn on strict relaying you will be running an open relay that the spammers will find in a few hours at most.  Once you turn off the relaying and set strict you can authorize relaying either through the ESMTP authorization or by allowing specific IP addresses to relay under connection control.  See the MercuryS help for details.</p><p> </p><p> </p>

Im working with xxamp.

My phpscript with mail() works OK.

Now i like to work with "PHPMailer because I like SMTP-AUTH scripts.

In the "class.phpmailer.php " I have to put the path of Mercury-Sendmail.

In this moment I got:

====================================

* Sets Mailer to send message using the $Sendmail program.
* @return void
*/
public function IsSendmail() {
if (!stristr(ini_get('sendmail_path'), 'sendmail')) {
$this->Sendmail = '/var/qmail/bin/sendmail';
}
$this->Mailer = 'sendmail';
}

===========================

But this is wrong because the answer is:

===================

"Could not execute: /var/qmail/bin/sendmail".

==================

So what I have to put there?
<P>Im working with xxamp.</P> <P>My phpscript with mail() works OK.</P> <P>Now i like to work with "PHPMailer because I like SMTP-AUTH scripts.</P> <P>In the "class.phpmailer.php " I have to put the path of Mercury-Sendmail.</P> <P>In this moment I got:</P> <P>====================================</P> <DIV class=codecontent>* Sets Mailer to send message using the $Sendmail program. * @return void */ public function IsSendmail() { if (!stristr(ini_get('sendmail_path'), 'sendmail')) { $this->Sendmail = '/var/qmail/bin/sendmail'; } $this->Mailer = 'sendmail'; }</DIV> <DIV class=codecontent>===========================</DIV> <DIV class=codecontent>But this is wrong because the answer is:</DIV> <DIV class=codecontent>===================</DIV> <DIV class=codecontent>"Could not execute: /var/qmail/bin/sendmail".</DIV> <DIV class=codecontent>==================</DIV> <DIV class=codecontent>So what I have to put there?</DIV>

You can send mail through Mercury by submitting it by SMTP or by creating a .101 file in the queue directory. This means that entering the path to mercury.exe won't be any help in this case (Mercury should already be running).

There is however a small command line mail client included with all recent versions of Mercury, msendto.exe.

MSendTo - A command-line mail generation utility for Mercury/32
Mercury Mail Transport System, Copyright (c) 1993-2008, David Harris.

Usage: MSendTo -CONFIG  or  MSendTo <options>

Options:
   -TO <address>           Specify "To:" field
   -CC <address>           Specify "Cc:" field
   -BCC <address>          Specify "BCc:" field
   -SUBJECT <"string">     Specify subject: "string" must be quoted.
   -BODY <filename>        Specify filename containing message body
   -FROM <address>         Specify sender e-mail address ("From:" field)
   -FT <filename>          Attach a simple text file (no encoding)
   -FB <filename>          Attach a binary file (BASE64 encoding)
   -FM <filename>          Attach a valid RFC2822-format mail message
   -URGENT                 Mark the message as "Urgent"
   -DELIVERY               Request confirmation of delivery for the message
   -TRANSCRIPT <address>   Turn on MercuryE transcript generation to <address>
   -INPUT <filename>       Read options from a file (see below)
   -SIGNATURE <filename>   Append the specified file to the message body
   -QUEUE <directory>      Specify the Mercury submission queue directory
   -CONFIG                 Prompt for defaults and settings

Option specifiers are case-insensitive and can be abbreviated to their first
two characters (e.g: -FR). When using the -INPUT option, you should specify
a text file containing any valid commandline options, one option per line.

It's located in the Mercury folder and could perhaps be used in your script.

/Rolf

&lt;p&gt;You can send mail through Mercury by submitting it by SMTP or by creating a .101 file in the queue directory. This means that entering the path to mercury.exe won&#039;t be any help in this case (Mercury should already be running).&lt;/p&gt;&lt;p&gt;There is however a small command line mail client included with all recent versions of Mercury, msendto.exe.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;font size=&quot;1&quot;&gt;&lt;i&gt;MSendTo - A command-line mail generation utility for Mercury/32 Mercury Mail Transport System, Copyright (c) 1993-2008, David Harris. Usage: MSendTo -CONFIG&amp;nbsp; or&amp;nbsp; MSendTo &amp;lt;options&amp;gt; Options: &amp;nbsp;&amp;nbsp; -TO &amp;lt;address&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify &quot;To:&quot; field &amp;nbsp;&amp;nbsp; -CC &amp;lt;address&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify &quot;Cc:&quot; field &amp;nbsp;&amp;nbsp; -BCC &amp;lt;address&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify &quot;BCc:&quot; field &amp;nbsp;&amp;nbsp; -SUBJECT &amp;lt;&quot;string&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify subject: &quot;string&quot; must be quoted. &amp;nbsp;&amp;nbsp; -BODY &amp;lt;filename&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify filename containing message body &amp;nbsp;&amp;nbsp; -FROM &amp;lt;address&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify sender e-mail address (&quot;From:&quot; field) &amp;nbsp;&amp;nbsp; -FT &amp;lt;filename&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attach a simple text file (no encoding) &amp;nbsp;&amp;nbsp; -FB &amp;lt;filename&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attach a binary file (BASE64 encoding) &amp;nbsp;&amp;nbsp; -FM &amp;lt;filename&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Attach a valid RFC2822-format mail message &amp;nbsp;&amp;nbsp; -URGENT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mark the message as &quot;Urgent&quot; &amp;nbsp;&amp;nbsp; -DELIVERY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Request confirmation of delivery for the message &amp;nbsp;&amp;nbsp; -TRANSCRIPT &amp;lt;address&amp;gt;&amp;nbsp;&amp;nbsp; Turn on MercuryE transcript generation to &amp;lt;address&amp;gt; &amp;nbsp;&amp;nbsp; -INPUT &amp;lt;filename&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Read options from a file (see below) &amp;nbsp;&amp;nbsp; -SIGNATURE &amp;lt;filename&amp;gt;&amp;nbsp;&amp;nbsp; Append the specified file to the message body &amp;nbsp;&amp;nbsp; -QUEUE &amp;lt;directory&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specify the Mercury submission queue directory &amp;nbsp;&amp;nbsp; -CONFIG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Prompt for defaults and settings Option specifiers are case-insensitive and can be abbreviated to their first two characters (e.g: -FR). When using the -INPUT option, you should specify a text file containing any valid commandline options, one option per line.&lt;/i&gt;&lt;/font&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;It&#039;s located in the Mercury folder and could perhaps be used in your script.&lt;/p&gt;&lt;p&gt;/Rolf &lt;/p&gt;

Hi Rolf

First of all thank you for the replying!!

More or less I understand what I have to do with "MSendTo.exe.

In this moment in my setup  "Mercury SMTP Server -> Connection control" the parameter   "Do not permite SMTP relaying of no local mail"  is OFF!!

So my php-script works fine.

My script:

================================== 

$message = "Midifile 1: \n"
."CD_Nr: ".$cd_f1."\n"
."Titel: ".$t1."\n"
."Interpret:  ".$i1."\n"
."OrdnerNr: ".$o1."\n"
."SongNr: ".$s1."\n "
."-------------------\n"
."Midifile 2: \n"
."CD_Nr: ".$cd_f2."\n"
."Titel: ".$t2."\n"
."Interpret:  ".$i2."\n"
."OrdnerNr: ".$o2."\n"
."SongNr: ".$s2."\n "
."-------------------\n"
."Midifile 3: \n"
."CD_Nr: ".$cd_f3."\n"
."Titel: ".$t3."\n"
."Interpret:  ".$i3."\n"
."OrdnerNr: ".$o3."\n"
."SongNr: ".$s3."\n "
."-------------------\n";

$email;
$subject = "Midi-Anforderung";
$to = "xxxxx@hotmail.de";
$extra = "From: <$email>\nCc: <$email>\n";

mail($to, $subject, $message, $extra)
 or "Send failed";

======================

But I like to turn in  "Mercury SMTP Server -> Connection control"   the parameter   "Only Authenticated SMTP connections may relay mail" of ON!!

To got more security!

Is there a posibility in my script to put a "pasword" and a "user" that Mercury understand it?

&lt;P&gt;Hi Rolf&lt;/P&gt; &lt;P&gt;First of all thank you for the replying!!&lt;/P&gt; &lt;P&gt;More or less I understand what I have to do with &quot;MSendTo.exe.&lt;/P&gt; &lt;P&gt;In this moment&amp;nbsp;in my setup&amp;nbsp;&lt;STRONG&gt; &quot;Mercury SMTP Server -&amp;gt; Connection control&quot;&lt;/STRONG&gt; the parameter&amp;nbsp;&amp;nbsp; &quot;&lt;STRONG&gt;Do not permite SMTP relaying of no local mail&lt;/STRONG&gt;&quot;&amp;nbsp; is &lt;STRONG&gt;OFF&lt;/STRONG&gt;!!&lt;/P&gt; &lt;P&gt;So my php-script works fine.&lt;/P&gt; &lt;P&gt;My script:&lt;/P&gt; &lt;P&gt;==================================&amp;nbsp;&lt;/P&gt; &lt;P&gt;$message = &quot;Midifile 1: \n&quot; .&quot;CD_Nr: &quot;.$cd_f1.&quot;\n&quot; .&quot;Titel: &quot;.$t1.&quot;\n&quot; .&quot;Interpret:&amp;nbsp; &quot;.$i1.&quot;\n&quot; .&quot;OrdnerNr: &quot;.$o1.&quot;\n&quot; .&quot;SongNr: &quot;.$s1.&quot;\n &quot; .&quot;-------------------\n&quot; .&quot;Midifile 2: \n&quot; .&quot;CD_Nr: &quot;.$cd_f2.&quot;\n&quot; .&quot;Titel: &quot;.$t2.&quot;\n&quot; .&quot;Interpret:&amp;nbsp; &quot;.$i2.&quot;\n&quot; .&quot;OrdnerNr: &quot;.$o2.&quot;\n&quot; .&quot;SongNr: &quot;.$s2.&quot;\n &quot; .&quot;-------------------\n&quot; .&quot;Midifile 3: \n&quot; .&quot;CD_Nr: &quot;.$cd_f3.&quot;\n&quot; .&quot;Titel: &quot;.$t3.&quot;\n&quot; .&quot;Interpret:&amp;nbsp; &quot;.$i3.&quot;\n&quot; .&quot;OrdnerNr: &quot;.$o3.&quot;\n&quot; .&quot;SongNr: &quot;.$s3.&quot;\n &quot; .&quot;-------------------\n&quot;;&lt;/P&gt; &lt;P&gt;$email; $subject = &quot;Midi-Anforderung&quot;; $to = &quot;&lt;A href=&quot;mailto:xxxxx@hotmail.de&quot; mce_href=&quot;mailto:xxxxx@hotmail.de&quot;&gt;xxxxx@hotmail.de&lt;/A&gt;&quot;; $extra = &quot;From: &amp;lt;$email&amp;gt;\nCc: &amp;lt;$email&amp;gt;\n&quot;;&lt;/P&gt; &lt;P&gt;mail($to, $subject, $message, $extra) &amp;nbsp;or &quot;Send failed&quot;;&lt;/P&gt; &lt;P&gt;======================&lt;/P&gt; &lt;P&gt;But I like to turn in&amp;nbsp;&amp;nbsp;&quot;&lt;STRONG&gt;Mercury SMTP Server -&amp;gt; Connection control&lt;/STRONG&gt;&quot;&amp;nbsp; &amp;nbsp;the parameter&amp;nbsp;&amp;nbsp; &quot;&lt;STRONG&gt;Only Authenticated SMTP connections may relay mail&lt;/STRONG&gt;&quot; of &lt;STRONG&gt;ON&lt;/STRONG&gt;!!&lt;/P&gt; &lt;P&gt;To got more security!&lt;/P&gt; &lt;P&gt;Is there a posibility in my script to put a &quot;pasword&quot; and a &quot;user&quot;&amp;nbsp;that Mercury understand it?&lt;/P&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft