Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

creating activation email

the mail() function

Moderators: macek, egami, gesf

Postby swirlee » Wed Feb 02, 2005 7:12 am

Yes, that sounds like a fairly standard implementation.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Postby Alexej Kubarev » Wed Feb 02, 2005 9:11 am

it looks ok but you need to use single quotes in the text or slashes because you start a parameter string with " and then have " in the body message..

That will send the mail... however you might need to set up some things in PHP.ini to make it work.. sendmail parameters (if any) for *nix systems OR

; For Win32 only.
SMTP = host here
smtp_port = port here (25 is default)
; For Win32 only.
sendmail_from = me@domain.com
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby Alexej Kubarev » Wed Feb 02, 2005 10:30 am

ofcourse... if you have an email server on localhost.. otherwise use this one:
smtp.bredband.net on port 25
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

Postby Alexej Kubarev » Thu Feb 03, 2005 11:36 am

well thats not a really smart :) hehe..

Sorry for the delay: had no time to look at the forum...

Anyway: nice that you've sorted it out :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

still receiving an error

Postby martyf » Tue Feb 15, 2005 12:55 am

Howdy,

I'm still receiving an error similar to the one stated above:
Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xxxxxxxxx\register.php on line 725

Line 725 is:
mail($emailAddress, $subject, $message, "From: XXXXXXX<admin@xxxx.com.au>\nX-Mailer: PHP/" . phpversion());

My PHP.ini file is set up as follows:
[mail function]
; For Win32 only.
SMTP = mail.xxxxx.com.au
smtp_port = 25
; For Win32 only.
sendmail_from = martyf@xxxxxxxxxxx.com.au

Are you able to help out with this problem at all?

Cheers,
Marty
martyf
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Feb 15, 2005 12:51 am


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.