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!
>
>... My advise would be to just simply set it as the
> address for from parameter, and use additional headers to mask the proper name onto the from field.
that's what I've done - it's working a treat.
thanks again.
JTD
> ... a bit more on this if you're interested..
>
> If you use the 'proper name
>
> get a duplicate of the mail sent back to the address stated in
> the -f switch - but it has the intended recipient's address in
> the 'to' field. The intended receipient does get the mail OK.
>
> I found this out after sending three mails to my whole members
> list and getting a copy of every mail sent back to my account.
>
> With the 'proper name' removed then no duplicate is sent.
>
>
> JTD
Strange eh? I also noticed abnormalities when playing around with the flag. My advise would be to just simply set it as the address for from parameter, and use additional headers to mask the proper name onto the from field.
> Glad it worked out for your JTD, but as for the Reply-To, not too
> sure as to why that would be. Thanks for letting us know how you
> got on!
... a bit more on this if you're interested..
If you use the 'proper name
I found this out after sending three mails to my whole members list and getting a copy of every mail sent back to my account.
With the 'proper name' removed then no duplicate is sent.
JTD
> JimTheDog wrote:
> Many Thanks for your efforts LukeM.
>
> I'll be trying that over the weekend - I'll post back how I get
> on.
>
...> JTD
>
> No problems! Be sure to share your findings :D
>
> Luke
Hi Luke<
I've implemented your method as per your gist examples and it works like a dream. Simple solution really - but well investigated.
My code:
//mail() wrapped in another function so I can call myMail() from anywhere and it always sends the same mailer datails
function myMail($to, $subject, $body){
$from = 'my proper name <[email protected]>' $eheader = 'FROM: '.$from;
//."rn".' Reply-To: '.$from; Reply -to removed to avoid spam flagging
$eparam = '-f '.$from;
$mailer = mail($to, $subject, $body, $eheader, $eparam);
};
Interstingly if I use the Reply-To element then my mails get flagged as possible spam on at least two of the mail systems I'm sending to.
Many thanks
JTD
> It's now on the bottom of my list. So the good news is forum
> posting just got moved up the list!
Ha! :¬)
By a process of elimination I've worked out you must now be working on the InstantPro Adsense/JavaScript plugin!
PS. I know people want this as I've received emails from complete strangers on it.
No one has ever asked me about RSS :¬P
[s]Hmmm...[/s]
My Freeola InstantPro Site > LukeM wrote:
> Perhaps someone could look at Freeola's generic
> form_to_mail.php
> script at some point in the future?
It's now on the bottom of my list. So the good news is forum posting just got moved up the list!
> ...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]