views:

21

answers:

0

I have installed mdaemon mail server in my computer, and register the email user "[email protected]". I have also tested it with "worldclient" that it can send emails correctly. Now I want to send emails with action mailer using this mail server. But I cannot send email correctly. The sending email method is shown below:

def register_email(user)

    ActionMailer::Base.smtp_settings = {
        :address  => "127.0.0.1",
        :port => 25, 
        :domain  => "tuzhu001.com",
        :authentication  => :login,
        :user_name  => "[email protected]",
        :password => "123456",
    }    
    recipients    user["email"]
    from          "[email protected]"
    subject       "Welcome to Tuzhu"
    body          (:url => user["url"])
    sent_on       Time.now
end

Anyone can help me?