Issue with PHP Code [$mail->FromName] built-in form Processing and Auto Responder

Issues related to forms.
Post Reply
ckozushko
 
 
Posts: 10
Joined: Fri Jun 14, 2013 4:25 pm

Issue with PHP Code [$mail->FromName] built-in form Processing and Auto Responder

Post by ckozushko »

I am having an issue with the Form Processing built-in PHP form processing script.

What I am trying to accomplish here is, when a client opts-in via my form and PHPMailer sends an email to me and also the Auto Responder to the client , I want my NAME to show up in the FROM: field and not my email address.

I noticed the PHP generated code creates

$mail->FromName = $mailfrom

and

$mail->FromName = $autoresponder_from

If I manually change $mailfrom and $autoresponder_from to my name then the received emails have my name in the FROM: field and not my email address.

It’s frustrating that I have to manually alter the PHP code every time I make a change or test it after uploading my pages.

Could you add a field to input a text name for the [FROM:] on the Form Processing and also for the Auto Responder. That way I don’t have to manually change the code after I upload it.

I noticed there is a [More...] button for CC: and BCC: and FROM: but they only except email address. If I put text in any of those fields the page fails to load properly. It loads into the browser with all of the PHP code displayed over top of the page. I can’t figure out what the error message is because it doesn’t display a PHP error message.

If you can change the FROM: in the [More...] section to except text for the $mail->FromName = 'myName' and not email addresses, and also for the Auto Responder part to except text for the $mail->FromName = 'myName' that would save me a lot of time.

I also tried toggling the "Set Envelope-from address for PHP mail() with the -f option" checked or uncheck in the Miscellaneous tab with no results. No difference either way.

If you have any solutions or suggestions, that would great.
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Issue with PHP Code [$mail->FromName] built-in form Processing and Auto Responder

Post by Pablo »

1. Right click the form
2. Select 'Object HTML'
3. Click 'Custom form processing'
4. Copy code:

Code: Select all

$mail->FromName = "Your Name"
ckozushko
 
 
Posts: 10
Joined: Fri Jun 14, 2013 4:25 pm

Re: Issue with PHP Code [$mail->FromName] built-in form Processing and Auto Responder

Post by ckozushko »

Thank you, that fixes half my issue. I didn’t know this Custom Form Processing existed. That will come in handy

It overrides [$mail->FromName = $mailfrom] but how do I override the [$mail->FromName = $autoresponder_from] PHP code section.

[$mail->FromName = $autoresponder_from] sits after the Custom Form Processing [$mail->FromName=”My Name”;] is inserted into the code, so it can’t override.

Any other solutions?
User avatar
Pablo
 
Posts: 21569
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Issue with PHP Code [$mail->FromName] built-in form Processing and Auto Responder

Post by Pablo »

I'm sorry, there is currently no option for that.
I will investigate if this can be added in a future update.
Post Reply