501 Bad Recipient Address Syntax

Hi,

I’m having a problem with sending email with ActionMailer.

My mailer looks something like this:

class PNGMailer < ActionMailer::Base

def forgotten_password_email (password_reset, user)
recipients = user.email
from = “[email protected]
subject = “Password Change Request”

body :first_name => user.first_name, :last_name => user.last_name

end

end

I have checked a million times that recipients is set to a valid email
address.

When I check my postfix logs, I get the following message:

warning: Illegal address syntax from localhost[127.0.0.1] in RCPT
command: <>

It appears that somewhere down the line, I am losing the recipient email
address.

Even more odd is the fact that this code works fine on my dev computer.
Just not on my server.

Any ideas?

Thanks.

Mendicant Zero x wrote:

Hi,

I’m having a problem with sending email with ActionMailer.

My mailer looks something like this:

class PNGMailer < ActionMailer::Base

def forgotten_password_email (password_reset, user)
recipients = user.email
from = “[email protected]
subject = “Password Change Request”

body :first_name => user.first_name, :last_name => user.last_name

end

end

Sorry to bother, but it appears my problem has to do with needing it to
be @recipients, not just recipients.