Jump to content

exhaler

Members
  • Posts

    85
  • Joined

  • Last visited

    Never

About exhaler

  • Birthday 10/10/1987

Profile Information

  • Gender
    Male
  • Location
    Lebanon - Beirut

exhaler's Achievements

Member

Member (2/5)

0

Reputation

  1. i'm able to send using mail() on my yahoo hosting, however i want to use my other server to send emails without having to worry about the email limit
  2. hahaha, mail.domainname.info is just an example, i cannot post the actual domain i'm using.
  3. i forget to show error in the php this is what i get: Warning: fsockopen(): unable to connect to mail.domainname.info:25 in /phpmailer/class.smtp.php on line 122
  4. Hello all, i currently have a yahoo hosting and since they have a limit of outgoing emails, i want to use smtp to send emails from another server. Below is the code i'm using (phpmailer for PHP 4): <?php include_once("phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 1; $mail->SMTPAuth = true; $mail->Host = "mail.domainname.info"; $mail->Port = 25; $mail->Username = "[email protected]"; $mail->Password = "password"; $subject = "domainname"; $body = $mail->getFile("message/header-mail.php"); $body = "<table cellpadding=\"0\" cellspacing=\"0\" width=\"540\"> <tr> <td align=\"left\" valign=\"top\" style=\"padding-top: 50px;\" > <span style=\"font-size: 10pt; color: #F58220;\"> text goes here </span> </td> </tr> </tr> </table>"; $body .= $mail->getFile("message/footer-mail.php"); $body = eregi_replace("[\]",'',$body); $mail->From = "[email protected]"; $mail->FromName = "domainname"; $mail->AddAddress("[email protected]", "firstname lastname"); $mail->Subject = $subject; $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test $mail->IsHTML(true); $mail->MsgHTML($body); if ($mail->Send()) { echo "Message sent!"; } else { echo "Mailer Error: " . $mail->ErrorInfo; } ?> the code above gives me this error when i run it: SMTP -> ERROR: Failed to connect to server: No route to host (65) Mailer Error: SMTP Error: Could not connect to SMTP host. The above script is working if i run it directly on the mailing server instead of the yahoo one. Thanks for the help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.