Web Hosting Reviews for Affiliate Marketers

Unlimited Shared hosting & Unlimited Disk Space from $5.95 - Dreamhost
Solid Managed VPS with 4 IP's from $60 - Liquid Web
Lightning Fast Dedicated Servers & 1GB RAM from $149 - Liquid Web
#1 Domain Registration with WHOIS Privacy - Just $9.95

This Dreamhost thread was started by dmarti on 2009-11-26 04:21:23:

Post Reply? I want to put a contact form on my website, and use mail.php to send a message to my mailbox, throught my SMTP, but when I exec this code: <?php require_once “Mail.php”; $from = “David <david@intarex.com>”; $to = “David Recipient <david@intarex.com>”; $subject = “PHP mail test”; $body = “Hi,nnHow are you?”; $host = “mail.intarex.com”; $username = “alpha”; $password = “aaassxxcc”; $ip = gethostbyname($host); echo(”<p>Send mail to: ” . $host .”(” . $ip . “)</p>”); $headers = array (’From’ => $from, ‘To’ => $to, ‘Subject’ => $subject); $smtp = Mail::factory(’smtp’, array (’host’ => $host, ‘auth’ => true, ‘username’ => $username, ‘password’ => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo(”<p>Error</p>”); echo(”<p>” . $mail->getMessage() . “</p>”); } else { echo(”<p>Message successfully sent!</p>”); } ?> I get this result: — Send mail to: mail.intarex.com(80.38.238.144) Error Failed to connect to mail.intarex.com:25 [SMTP: Failed to connect socket: Connection refused (code: -1, response: )] — but my smtp is up and working. Any ideas about this error? Thanks in advance.

Join in on the original post at the Dreamhost Forum, Sign up for Dreamhost or view our Review of Dream Host.

Related Web Host Reviews


Close
E-mail It