WebsiteBaker Support (2.13.x) > General Help & Support

wb-mail function adds the wrong REPLY-TO

(1/1)

CodeALot:
I use the following code in a page:


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

--- End code ---

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: ---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.

--- End code ---

sternchen8875:

--- Quote ---
--- Code: ---$wb->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message
--- End code ---

--- End quote ---

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'
                    )
--- End quote ---

used parameters == green
possible other parameters == red

CodeALot:
Thank you! That convinced the spam filters to let the mails through :-)

Navigation

[0] Message Index

Go to full version