Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-12-2005, 04:23 AM php mail() problem
Super Talker

Posts: 110
Trades: 0
I am not able to send mail by php using mail() function..
This is what I am using:
mail("info@herbsandcures.com","test","msg","From: info@herbsandcures.com")

I have Sendmail installed on my my server..
Though I am able to send mail using JavaMail API, and normal client tools like neomail etc..

There must be problem in php itself...
I have also edited my php.ini as :

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
SMTP = localhost ;
sendmail_path = /usr/sbin/sendmail -t -i;
;sendmail_from = root@localhost.com ;


Please help me..
__________________

Please login or register to view this content. Registration is FREE
varunbihani is offline
Reply With Quote
View Public Profile Visit varunbihani's homepage!
 
 
Register now for full access!
Old 04-12-2005, 07:29 AM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
I think you're using the function incorrectly.

PHP Code:
                /* sending to */
                
$To "me@mywebsite.com";

                
/* subject */
    
$Subject "Birthday Reminders for August";

                
/* content */
                
$Content "bla bla bla bla"
            
    
/* To send HTML mail, you can set the Content-type header. Delete 
                     the forward slash's as appropriate, the first paragraph 
                     will send in plain text*/

                //$headers .= "Content-type: text/plain\n";
    //$headers .= "Content-Transfer-Encoding: quoted-printable\n";
    
    //$headers .= "Content-type: text/html; charset=iso-8859-1\n";
    //$headers .= "Content-transfer-encoding: 8bit\n";
        
    /* additional headers */
    
$headers .= "From: $FromName <$FromAddress>\n";
    
    
/* and now mail it */

    
mail($To$Subject$Content$headers); 
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php mail() problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17391 seconds with 12 queries