[Solved]: Can't send any e-mail: Coppermine or PHPMailer sends wrong FROM-header [Solved]: Can't send any e-mail: Coppermine or PHPMailer sends wrong FROM-header
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Can't send any e-mail: Coppermine or PHPMailer sends wrong FROM-header

Started by Joennuh, August 17, 2008, 03:26:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joennuh

Hello people,

My English is poor (motherlanguage is Dutch), but I'll try to explain my problem in English as far as I can.

I discovered I can't send any e-mail from the Coppermine system. So activation e-mails, notification e-mails, e-cards, etc. can't be mailed.

When doing a research I discoverd Coppermine or the included and used PHPMailer is sending a wrong FROM. My Argosoft Mail Server for Windows says the FROM-header is as follows:
QuoteMAIL FROM:< username <something@realdomain.com>>
While I think it has to be something like:
QuoteMAIL FROM:<something@realdomain.com>
with a hidden extra FROM header.
Or it has to be:
QuoteMAIL FROM: "username" <something@realdomain>
(this last one could be also the hidden header in a correct case)

I use also PHPMailer within my own website projects and as far I can see I'm using exactly the same version of PHPMailer which Coppermine holds.

When I watched the logs of my Argosoft Mail server wend sending a mail from one of my own project websites I see:
[qoute]MAIL FROM:<something@realdomain.com>[/quote]
And when I have a look on my mailbox it is deliverd as:
Quote"username" [something@realdomain.com

In the wrong case (the Coppermine case) the e-mail will be stopped at the relaying server of my ISP which i have to use, because the FROM mailadres which is send from my mailserver to the relaying server is modified to:
Quote<username <somehting@realdomain.com>

So the many wrong placed < and > gives me many problems to send correct e-mails.

I couldn't find any rare cases withing the scripts ecard.php and /include/mailer.ionc.php.

Can anyone tewll me what I should do to resolve this problem (without re-installing Coppermine or somehting like that)?

Joennuh

Forgotten to include:
Coppermine version: 1.4.19
Server: Aapche (exact version unknown)
PHP: version 5.0.4
OS: Windows 2000 SP4 Dutch

Joennuh

I have found a solution on my own.

Apparently the problem is within PHPMailer. With some debugging I discovered that Coppermine is sending the sender-data correctly. I couldn't find which code in PHPMailer causes the problem but I am sure it has something to be with using the PHP Mail() connection from within PHPMailer.

By filling in the SMTP-server on the Coppermine administrator settings page Coppermine uses PHPMailer it's own SMTP-engine and that works very well. ;D