/    Sign up×
Community /Pin to ProfileBookmark

mail() error … wonder why

i keep getting this msg error

Warning: mail(): “sendmail_from” not set in php.ini or custom “From:” header missing in C:Program FilesApache GroupApache2htdocsmambocomponentscom_joltcardjoltcard.php on line 88

i coudln’t figure out the problem

this is my php.ini configuration
[mail function]
; For Win32 only.
SMTP = “smtp.streamyx.com”
SMTP_PORT = “25”

; For Win32 only.
sendmail_from = [email][email protected][/email]

and this is my coding for sending mail
mail($to_email,$ToSubject, $toMessage, “From: “.$from_email);

can anyone tell me where goes wrong?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@ShrineDesignsOct 14.2004 — in order to use smtp, you must install an smpt server on to your computer, there are a few freeware smtp servers available on the net
Copy linkTweet thisAlerts:
@ltingauthorOct 14.2004 — smtp.streamyx.com is a working smtp server provided by my ISP

but nvm i solved the problem already ..

i have to put two lines of codes above mail()

ini_set("SMTP", "smtp.streamyx.com");

ini_set("sendmail_from", "[email protected]");

i wonder why .. these two lines of codes will just set the SMTP and sendmail_from in my php.ini..but i did already set them in php.ini ..

i think is a bug for php.
Copy linkTweet thisAlerts:
@Paul_JrOct 14.2004 — [font=palatino linotype]If you remove the quotes from around the directive values, it should work. I took a peek in my .ini file, and I see no quotes present.[/font]
Copy linkTweet thisAlerts:
@ltingauthorOct 16.2004 — i try but no working as well ...
Copy linkTweet thisAlerts:
@MallerOct 17.2004 — Your kinda missing the mailheaders, try something like this instead

[code=php]
$mailheaders = "From: $from_email";
mail($to_email, $ToSubject, $toMessage);
[/code]

There is no reason to use ini_set() so just remove that.

And like Paul Jr said, remove the quotes from your php.ini
×

Success!

Help @lting spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...