Page 1 of 1

Send2Freind troubles

Posted: Sun May 06, 2007 7:00 pm
by stealth
I have a little problem;
The Send2Freind script doesn't work for me as designed.
I'm looking for a work around.

My server requires that any script based sent mail has either the From: or To: elements of the email to have a valid email which is hosted on the server the script is being run from.

With the Send2Freind script it doesn't have this compliance with ver phpMyFAQ 1.6.8 or phpMyFAQ 1.6.11

Any ideas on a work around for this?

Posted: Mon May 07, 2007 6:45 am
by matteo
Hi,
what about always adding the PMF webmaster email in <To:>?

Ciao,
Matteo

Posted: Mon May 07, 2007 4:38 pm
by stealth
Yes this is what I was looking into doing in the mailsend2friend.php but I'm not quite sure how to place it in the code. I made a couple attempts yesterday but had no success.

Posted: Mon May 07, 2007 8:23 pm
by matteo
Hi,
stealth wrote:Yes this is what I was looking into doing in the mailsend2friend.php but I'm not quite sure how to place it in the code. I made a couple attempts yesterday but had no success.
change this code below:

Code: Select all

...
            if ($mail != "") {
                mail(
                    $IDN->encode($mail),
                    $PMF_LANG["msgS2FMailSubject"].$name,
                    $PMF_CONF["send2friend_text"]."\r\n\r\n".$PMF_LANG["msgS2FText2"]."\r\n".$link."\r\n\r\n".$attached,
                    "From: ".$IDN->encode($mailfrom)
                );
                usleep(500);
            }
...
into:

Code: Select all

...
            if ($mail != "") {
                mail(
                    $IDN->encode($mail),
                    $PMF_LANG["msgS2FMailSubject"].$name,
                    $PMF_CONF["send2friend_text"]."\r\n\r\n".$PMF_LANG["msgS2FText2"]."\r\n".$link."\r\n\r\n".$attached,
                    "From: ".$IDN->encode($mailfrom)."\r\nCc: ".$IDN->encode($PMF_CONF['adminmail'])
                );
                usleep(500);
            }
...
Please backup the mailsend2friend.php file before applying the mod, to easily return to the original code if needed.

Ciao,
Matteo

Posted: Mon May 07, 2007 9:13 pm
by stealth
I was in the right place with the right idea but didn't have the right syntax.
Works like a charm :D

Thanks a heap :!: :!:

send to friend

Posted: Mon Jun 04, 2007 1:53 pm
by samtheman
I have tried the solution you have published but it still does not work, it only sends the email to the admin user (which is me) but does not send to the additional email addresses you put down, can anyone suggest what to do to get this useful essential feature working?

thnaks