mail("nobody@example.com", "the subject", $message, "From: webmaster@{$_SERVER['SERVER_NAME']}", "-fwebmaster@{$_SERVER['SERVER_NAME']}");
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #5 on: Sep 24, 2006, 03:02:04 pm »
add this value:
if (mail($mail_address, $subject, $body, $header, "-fwebmaster@{$_SERVER['SERVER_NAME']}")) {
(the bold part)
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #6 on: Sep 24, 2006, 03:02:58 pm »
By the way this class is not written for newbies
My name is Bong, James Bong
Posts: 11
70 credits Members referred : 0
« Reply #7 on: Sep 24, 2006, 03:13:35 pm »
Hi, I made the change and when I press Submit on the register page, it gives me this error:
Warning: mail(): SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /usr/local/psa/home/vhosts/adkm.34sp.com/httpdocs/classes/access_user/access_user_class.php on line 470
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
Hi, I made the change and when I press Submit on the register page, it gives me this error:
Warning: mail(): SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /usr/local/psa/home/vhosts/adkm.34sp.com/httpdocs/classes/access_user/access_user_class.php on line 470
from the manual: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3 this parameter is disabled in safe_mode and the mail() function will expose a warning message and return FALSE if you're trying to use it.
then you have a problem (or you have to wait until the version using external mail programs is ready)
My name is Bong, James Bong
Posts: 11
70 credits Members referred : 0
« Reply #9 on: Sep 24, 2006, 03:45:59 pm »
thanks mate, i'll keep an eye out. you're great!
What a dork
Posts: 17
110 credits Members referred : 0
« Reply #10 on: Nov 23, 2006, 04:48:09 pm »
Hi Dude, gmail.com doesn't receive mails send by the Access User Class. Other addresses work fine. This is the code: function send_mail($mail_address, $msg = 29, $subj = 28, $send_admin = false) { $header = "From: \"".$this->webmaster_name."\" <".$this->webmaster_mail.">\r\n"; if ($send_admin) $header .= "Bcc: ".ADMIN_MAIL."\r\n"; $header .= "MIME-Version: 1.0\r\n"; $header .= "Mailer: Olaf's mail script version 1.11\r\n"; $header .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n"; $subject = $this->messages($subj); $body = $this->messages($msg); if (mail($mail_address, $subject, $body, $header)) { return true; } else { return false; } }
How can I test this? Do you have any experience with it? If I send a mail from Outlook with the same sender address gmail receives it fine. (?)
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #11 on: Nov 23, 2006, 05:22:39 pm »
I think its time to publish the connector to use AU with my email class...I need the weekend I think...
What a dork
Posts: 17
110 credits Members referred : 0
« Reply #12 on: Dec 09, 2006, 03:30:10 am »
Olaf, just want to let you know that I solved the problem by taking out this line: $header .= "Mailer: Olaf's mail script version 1.11\r\n";
And replaced it with my own line. I made something up. Not used my own or anyone else's name of course.
I gather that some mail servers (gmail.com in my case) saw that line as an sign of abuse. Maybe somebody used your AU class in a bad way? In any case my problem is solved now. Later dude.
« Last Edit: Dec 09, 2006, 03:32:53 am by scooter »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
Olaf, just want to let you know that I solved the problem by taking out this line: $header .= "Mailer: Olaf's mail script version 1.11\r\n";
And replaced it with my own line. I made something up. Not used my own or anyone else's name of course.
I gather that some mail servers (gmail.com in my case) saw that line as an sign of abuse. Maybe somebody used your AU class in a bad way? In any case my problem is solved now. Later dude.
strange this mail snippet is based on an older mailscript from my website, but thank you for sharing that.
btw. my newer mail scripts doesn't have this link (and they are working good)
I love Pokemon
Posts: 14
96 credits Members referred : 0
Olaf, just want to let you know that I solved the problem by taking out this line: $header .= "Mailer: Olaf's mail script version 1.11\r\n";
And replaced it with my own line. I made something up. Not used my own or anyone else's name of course.
I gather that some mail servers (gmail.com in my case) saw that line as an sign of abuse. Maybe somebody used your AU class in a bad way? In any case my problem is solved now. Later dude.
can you give me a example of what you woul dreplace that with?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
Olaf, just want to let you know that I solved the problem by taking out this line: $header .= "Mailer: Olaf's mail script version 1.11\r\n";
And replaced it with my own line. I made something up. Not used my own or anyone else's name of course.
I gather that some mail servers (gmail.com in my case) saw that line as an sign of abuse. Maybe somebody used your AU class in a bad way? In any case my problem is solved now. Later dude.
can you give me a example of what you woul dreplace that with?
do you have any php knowledge?
I love Pokemon
Posts: 14
96 credits Members referred : 0
« Reply #16 on: Jan 02, 2007, 01:53:39 am »
Quote
do you have any php knowledge?
Quote
Working On it
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
using classes in PHP needs some fundamental knowledge of PHP, sorry this class is not really a beginners script...
I love Pokemon
Posts: 14
96 credits Members referred : 0
« Reply #18 on: Jan 03, 2007, 12:02:47 am »
I have been learning php and I have very well learned the python programing language from only using examples and using premade scripts I learn very fast if I use examples like your class.
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4232