Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,673 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,173 people online right now. Registration is fast and FREE... Join Now!




Mail Generation

 
Reply to this topicStart new topic

Mail Generation

Pradeepk
post 23 Jun, 2007 - 03:03 AM
Post #1


New D.I.C Head

*
Joined: 22 Jun, 2007
Posts: 20


My Contributions


my Mail function Code is.....

CODE
<?php
    $to = 'to@to.com';
    $from = 'from@from.com';
    $subject = 'This is a test email';
    $message = 'Dear John,\n\nThis is a fake email, I hope you enjoy it.\n\nFrom Jane.';

    $headers  = 'From: $from\r\n';

    $success = @mail($to, $subject, $message, $headers);
    if ($success)
        echo "The email to $to from $from was successfully sent";
    else
        echo "An error occurred when sending the email to $to from $from";
      
?>


printing the echo in else loop....

is there anything to change in autherization...

i am using wamp server...

[mod edit] Use the code tags! mad.gif
User is offlineProfile CardPM

Go to the top of the page

it career
post 23 Jun, 2007 - 03:50 AM
Post #2


New D.I.C Head

*
Joined: 14 Jun, 2007
Posts: 5


My Contributions


Does your webhost support sending emails? Do not see any mistake.
User is offlineProfile CardPM

Go to the top of the page

Pradeepk
post 23 Jun, 2007 - 05:50 AM
Post #3


New D.I.C Head

*
Joined: 22 Jun, 2007
Posts: 20


My Contributions


QUOTE(it career @ 23 Jun, 2007 - 04:50 AM) *

Does your webhost support sending emails? Do not see any mistake.


how to make our webhost support mailing?
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/23/08 06:14AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month