Trouble getting started.

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
User avatar
barb woolums
Forum Contributor
Posts: 134
Joined: Sun Feb 08, 2009 9:52 pm

Trouble getting started.

Post by barb woolums »

Hi,

Just trying to get Swift working with a simple test message but I'm getting this error

Fatal error: Uncaught exception 'Swift_BadResponseException' with message 'Expected response code(s) [250] but got response [550 "REJECTED - Interface: 74.126.25.56 is _my_ address"]<h3>Log Information</h3><pre>++ Log level changed to 4 ++ Forcing ESMTP mode. HELO is EHLO. ++ Forcing ESMTP mode. HELO is EHLO. >> MAIL FROM: <admin@webrecipemanager.com> << 550 "REJECTED - Interface: 74.126.25.56 is _my_ address" !! Expected response code(s) [250] but got response [550 "REJECTED - Interface: 74.126.25.56 is _my_ address"]</pre>' in /home/barbwool/public_html/swift/Swift.php:250 Stack trace: #0 /home/barbwool/public_html/swift/Swift.php(310): Swift->assertCorrectResponse(Object(Swift_Events_ResponseEvent), 250) #1 /home/barbwool/public_html/swift/Swift.php(373): Swift->command('MAIL FROM: <adm...', 250) #2 /home/barbwool/public_html/email_recipe.php(181): Swift->send(Object(Swift_Message), 'barb@bgwoolums....', 'admin@webrecipe...') #3 {main} thrown in /home/barbwool/public_html/swift/Swift.php on line 250

Why isn't my log data nicely formatted like everyone else BTW?
I've checked all my user details are OK and followed my hosting services instructions. Is there something else I have to do. I'm seding the message to myself, so I know the address works.

Here's my code

Code: Select all

    $smtp =& new Swift_Connection_SMTP("mail.webrecipemanager.com",25);
    $smtp->setUsername("admin@webrecipemanager.com");
    $smtp->setPassword("*******");
    $mmessage =& new Swift_Message("A Recipe From Web Recipe Manager", "Hello", "text/html");
    
    if ($swift->send($mmessage, "barb@bgwoolums.com", "admin@webrecipemanager.com")){
        echo 'yes';
    }else{
        echo "Message failed to send";
    }
    $swift->disconnect();
 
    echo $log->dump();
Any help would be greatly appreciated.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Trouble getting started.

Post by Chris Corbyn »

Speak to your host. Those errors suggest you are using the wrong SMTP server, or the SMTP server is not correctly configured.

The log information is output directly. The newlines are not being rendered because they are not <br /> tags. If you want to see the version with newlines in it, click "View Source" in your web browser ;)
Post Reply