943,526 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2125
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Oct 29th, 2008
0

Re: Send email from PHP

$fromEmail = "admin@domain.com"; 
$subject = "Welcome";
$body = "Hi,\n\nYou have visited the page.";
$sent=mail($Email, $subject, $body, $from) ;
if($sent)
{
  echo("<p>Message successfully sent!</p>");
 } else {
  echo("<p>Message delivery failed...</p>");
 }
Reputation Points: 3
Solved Threads: 2
Junior Poster
kings is offline Offline
107 posts
since Nov 2007
Oct 29th, 2008
0

Re: Send email from PHP

Hmm, maybe the PEAR mail extensions weren't installed. Do a page with just this code:
php Syntax (Toggle Plain Text)
  1. <?php include "Mail.php"; ?>

If you still get that error, then you need to manually install the mail extensions
Featured Poster
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
scru is offline Offline
1,624 posts
since Feb 2007
Oct 29th, 2008
0

Re: Send email from PHP

Hi scru,

Yeah, I'm in trouble of install the PEAR mail extensions. I download the file down and get into the commnd line. I use this command but it doesn't seem to do anything.

PHP Syntax (Toggle Plain Text)
  1. C:\PHP\pear install -o mail-1.1.14

Could you please show me hwo to install it manually.
Thank you.
Enz
Reputation Points: 10
Solved Threads: 0
Newbie Poster
enzogoy is offline Offline
23 posts
since Jul 2008
Jun 17th, 2009
0

Re: Send email from PHP

I also facing the same problem !!

Please help
Reputation Points: 10
Solved Threads: 0
Junior Poster
gingank is offline Offline
108 posts
since Jun 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Mail Server run in local host but cant use Mail() Function
Next Thread in PHP Forum Timeline: Auto button when user hits the Enter key





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC