WebsiteBaker Community Forum

WebsiteBaker Support (2.13.x) => General Help & Support => Topic started by: CodeALot on November 13, 2023, 12:29:01 PM

Title: wb-mail function adds the wrong REPLY-TO
Post by: CodeALot on November 13, 2023, 12:29:01 PM
I use the following code in a page:

Code: [Select]
$wb->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message

Mailer settings are set to SMTP, with debug on for now. When sending an e-mail, the wb->mail adds a reply-to that is the same as the recipient. Why does it do that and how can I change that? Receiving mailservers are rejecting this mail because having the TO and REPLY-TO the same makes no sense and is a spam-flag.

This is (part of) the DEBUG-response when I try to send the message from within the website:

Code: [Select]
2023-11-13 11:22:33 CLIENT -> SERVER: To: recipient@serverone.nl
2023-11-13 11:22:33 CLIENT -> SERVER: From: sender@servertwo.nl
2023-11-13 11:22:33 CLIENT -> SERVER: Reply-To: recipient@serverone.nl
...
2023-11-13 11:22:34 SERVER -> CLIENT: 554 5.7.1 Spam message rejected
2023-11-13 11:22:34 SMTP ERROR: DATA END command failed: 554 5.7.1 Spam message rejected
SMTP Error: data not accepted.
Title: Re: wb-mail function adds the wrong REPLY-TO
Post by: sternchen8875 on November 13, 2023, 03:49:59 PM
Quote
Code: [Select]
$wb->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message

add more attributes/parameters to the function call

here the complete list (class.wb.php // Ln 1005)

Quote
public function mail(
                    $sFromAddress,
                    $toAddress,
                    $sSubject,
                    $sMessage,
                    $sFromname='',
                    $toName='',
                    $sReplyToAddress='',
                    $sReplyToName='',
                    $sMessagePath='',
                    $aAttachment=null,
                    $sCallingScript='none'
                    )

used parameters == green
possible other parameters == red
Title: Re: wb-mail function adds the wrong REPLY-TO
Post by: CodeALot on November 13, 2023, 04:19:17 PM
Thank you! That convinced the spam filters to let the mails through :-)