mail() function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

mail() function

Post by shiznatix »

is there a way to use the mail() function when safe mode is enabled? if not is there a alternative to mail() to send emails automatically?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I haven't heard of anything that says you can't use [php_man]mail()[/php_man] in safe_mode.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

Warning: mail(): SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /home/wesmok2/public_html/shizRadio/register.php on line 33

:oops: sorry i didnt notice the "fifth parameter is disabled" message thats my stupidity sorry.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

chalk it up to learning something new.. ;) :lol:
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Post by AGISB »

YOu might consider using phpmailer. With this you avoid getting you mail moved to someones spam folder as well.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

That really had nothing to do with the problem at hand.. I'm not sure whether that was an advertisement or just a personal comment, but as long as you send emails with the correct headers and your title doesnt include "penis", "grow", "inches", "millionaire", etc.. then it shouldn't end up in someone's spam folder.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

lol. ya the mail function will suit me just fine and if my mail does end up in spam folders then ill just read the topic were they discuesed that issue. thanks
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Post by AGISB »

LiLpunkSkateR wrote:That really had nothing to do with the problem at hand.. I'm not sure whether that was an advertisement or just a personal comment, but as long as you send emails with the correct headers and your title doesnt include "penis", "grow", "inches", "millionaire", etc.. then it shouldn't end up in someone's spam folder.
This is not an advertisment for a FREE function and your statement is kind of correct but mail() does however not send the correct header unless you set the last parameter which will yield a warning message in the mail header. This last parameter might indeed be the problem at hand.

mail() -> sendmail which replaces the 'Return-Path:' and it doesn't match the from and replyto headers any longer. This will indeed leads to many mail providers to move the message to spam. This can only be avoided by using a function that can email without using sendmail.
Post Reply