Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2012, 06:15 PM   #1
Registered: May 2012
Posts: 60

Rep: Reputation: Disabled
PHP Mail

I followed the following guide to install the software necessary to get email to work on my ubuntu server.

I can send mail within the local host using php scripts, but external host like hotmail.. no dice!!

This is the script I'm using:

$to = "";
$subject = "Hi";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!<p>");
} else {
echo("<p>Message delivery failed...<p>");
Old 05-26-2012, 06:39 PM   #2
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
It works with gmail!! That's good enough, though it will have to work with an exchange server.
Old 05-26-2012, 06:49 PM   #3
Registered: May 2012
Posts: 60

Original Poster
Rep: Reputation: Disabled
I have it working, just some syntax errors in the email addresses... I'm dumb


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending mail in php to Israel mail servers Four Programming 4 10-23-2009 10:37 AM
PHP - Mail.php and Mail/mime.php issues LVsFINEST Linux - Server 1 02-08-2009 05:44 PM
Want to send mail with php mail() command - minimum config required? FeathersMc Linux - Server 2 10-26-2008 12:21 AM
PHP Website with e-mail forms, what mail daemon? gbkyle Linux - Software 1 07-05-2005 12:33 PM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration