The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Check out my mail() .php test gist on github.com.
After running this I have found that not sending with -f flag can be done. It might still be safer always to set it however.
To add nice names as requested by JimTheDog in Hmmm's thread all you need to do is utilise the fourth parameter in the mail() function for additional headers. Just format e-mail addresses in the following way:
Nice Name <[email protected]>
Just a handy tip!
Check out my mail() .php test gist on github.com.
After running this I have found that not sending with -f flag can be done. It might still be safer always to set it however.
To add nice names as requested by JimTheDog in Hmmm's thread all you need to do is utilise the fourth parameter in the mail() function for additional headers. Just format e-mail addresses in the following way:
Nice Name <[email protected]>
Just a handy tip!
Have you tested this with a non-Freeola registered email address?
Am I right in thinking this is supposed to put the visitors email address in the 'From' field when a form is submitted? This would mean that you could then hit Reply and not have to change the email address before clicking Send.
I remember when the changes were made as documented here to your formmail script for security/spam reasons. If you are sure this will work with non-Freeola addresses perhaps this could be updated?
[s]Hmmm...[/s]
> Hi Luke,
> Have you tested this with a non-Freeola registered email
> address?
>
> Am I right in thinking this is supposed to put the visitors
> email address in the 'From' field when a form is submitted? This
> would mean that you could then hit Reply and not have to change
> the email address before clicking Send.
>
> I remember when the changes were made as
> documented
> here to your formmail script for security/spam reasons. If
> you are sure this will work with non-Freeola addresses perhaps
> this could be updated?
I have not tested with non-freeola addresses, you can try my gist on your own Freeola account with a non-freeola e-mail address though.
I'll have a look later this evening myself.
Please note: I am talking about using mail() function rather than the form to mail script. The behaviour may be different with that script.
As I mentioned 'you' did introduce the changes for security reasons...
It will be interesting to see how you get on.
[s]Hmmm...[/s]
mail($from, $subject, $message, $additional_headers, $additional_flags);
Only the first three fields are required in PHP. PHP then parses the constructed e-mail onto sendmail.
Now here are some bullet points of my findings:
- Not setting $additional_headers or $additional_flags will mean a server e-mail address will be used as the from address
- $from must be a Freeola E-mail address
- $additional_headers can overwrite $additional_flags and $from
- $additional_flags can overwrite $from
That means you can use a valid Freeola E-mail address in the $from and then mask it using either $additional_headers or $additional_flags.
It also means currently the server does not require the -f flag if you provide a From header in $additional_headers. If you set the -f flag and provide a From field in $additional_headers, the -f flag will be overwritten and is left unused.
Also it is worth pointing out $additional_headers is better than using -f anyway since you can style the from field as such:
$additional_headers = "From: Luke M <[email protected]>";
rather than just
$additional_flags = "-f [email protected]";
So there you have it, a myth buster on our free servers.
I'll be trying that over the weekend - I'll post back how I get on.
Once again sorry to Hmmm... for confusing his thread.
I am a baaaad dog.
JTD
> Many Thanks for your efforts LukeM.
>
> I'll be trying that over the weekend - I'll post back how I get
> on.
>
> Once again sorry to Hmmm... for confusing his thread.
>
> I am a baaaad dog.
>
> JTD
No problems! Be sure to share your findings :D
Luke
> That means you can use a valid Freeola E-mail address in the
> $from and then mask it using either $additional_headers or
> $additional_flags.
This all sounds good.
Would you be able to use this info to add a new option to the Freeola formmail script so that the visitors email address can come through as the 'From' address?
[s]Hmmm...[/s]
<input type="hidden" name="from" value="Luke <[email protected]>">
I have not tested though nor have I looked at how Form to Mail actually works.
> ...nor have I looked at how Form to Mail actually works.
Nice answer :¬P
It would be useful for people if the visitors address could be used in the 'From' field as many people just hit reply from a form submission and end up writing to themselves!
It's been brought up here a few times in the past...
Perhaps someone could look at Freeola's generic form_to_mail.php script at some point in the future?
[s]Hmmm...[/s]