NYCPHP Meetup

NYPHP.org

[nycphp-talk] Setting up outgoing mail usingLinux

PaulCheung paulcheung at tiscali.co.uk
Wed Jun 18 17:49:46 EDT 2008


The problem was not really technical. It was the to do with the way 1and1 have setup their webhosting packages. the Linux package I was using, the so named business package, doesn't support sending emails. when I upgraded to their Linux Business-Pro package, which supports SSH, I was able to send emails from PHP applications.

<?php
$to = "johndoe at hotmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$headers = "From: sender at example.com\r\n" . "X-Mailer: php";
if (mail($to, $subject, $body, $headers)) {
  echo("<p>Message sent!</p>");
 } else {
  echo("<p>Message delivery failed...</p>");
 }
?>

Paul

  ----- Original Message ----- 
  From: David Mintz 
  To: NYPHP Talk 
  Sent: Wednesday, June 18, 2008 8:37 PM
  Subject: Re: [POSSIBLE SPAM] Re: [nycphp-talk] Setting up outgoing mail usingLinux


  And the solution was.... ?


  On Wed, Jun 18, 2008 at 12:41 PM, PaulCheung <paulcheung at tiscali.co.uk> wrote:

    Thanks everybody for your help and suggestions. The problem is now sorted

    Paul




  -- 
  David Mintz
  http://davidmintz.org/

  The subtle source is clear and bright
  The tributary streams flow through the darkness 


------------------------------------------------------------------------------


  _______________________________________________
  New York PHP Community Talk Mailing List
  http://lists.nyphp.org/mailman/listinfo/talk

  NYPHPCon 2006 Presentations Online
  http://www.nyphpcon.com

  Show Your Participation in New York PHP
  http://www.nyphp.org/show_participation.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080618/b8908e77/attachment.html>


More information about the talk mailing list