Jump to content

PHP Mail script sends via the wrong adres


SlayrNeo

Recommended Posts

Hi,

 

I have been working on a script to send en email. Everything works, but the problem is that the sender sees the wrong address.

The mail I receive from the script is perfect, I see the name and email adres in the from-section.

But the mail the sender receives is wrong. He sees in the from-section: [email protected] instead of [email protected]

The jk????? is the accountname on the webhosting.

 

Could someone point me in the right direction on how to fix this?  I have added the script as attachment.

 

Thanks in advance,

Nick

 

[attachment deleted by admin]

The From: address in the header must be a valid mail box at the sending mail server.

 

I'm guessing the email that is the problem is the 'copy' you are sending to the visitor? If so, the $headers variable being used for it should probably just be the same as that being used in the main email that is being set to you (without the multipart/mixed; boundary= being used to attach the uploaded file to the email.)

Yeah, the problem is the mail sending to the visitor.

 

The code is now:

 

// If Sending a copy to visitor is checked and the field from where to get the visitor email

// address is selected we send a copy to the visitor

if ( ($FCopyToSender == 1) && ($FMesFromT ==2) AND ($Spam == 0) )

{

$headers = "From: $FFirstName <[email protected]>\r\n";

$headers = "Reply-to: $FFirstName <$FEmail>\r\n";

$subject = 'Uw aanvraag is ontvangen.';

 

The header was first: $headers = "From: $FFirstName <$FEmail>\r\n";

 

The mail-adres doest exist at the hosting server, but it still choses [email protected]. And from what I can see in thecode, it should be [email protected]

 

Or am I missing something?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.