Sorted. Entirely my stupidity.
Quick explaination:
The server wasn''t complaining about the from address - it was
complaining about the fact that the server didn''t have a reverse
mapping
on the hostname it provided.
I didn''t notice this at first because ActionMailer was suppressing any
errors it received from the smtp server. Once i realised that the
environments/development.rb overrides environments.rb (duh!), i made
active mailer raise mail errors. That gave me a nice error message. I
then set up a reverse dns lookup for my dev server (something i should
have done ages ago) and all worked :0)
Steve
Stephen Bartholomew wrote:> I''m having a weird problem with a mailer model. The from address
> doesn''t seem to be set - my mail logs it shows that the sender
address
> is the default www@my.server.hostname and this causes the mail to
> bounce.
>
> The mailer code looks like this:
>
> def thismail
> @subject = "Subject"
> @recipients = "toemail@address.com"
> @from = "myemail@address.com"
> # rest of code
> end
>
> The weird thing is, the development log shows the correct details...
> ---------
> Sent mail:
> From: myemail@address.com
> To: toemail@address.com
> ---------
>
> Anyone come across this problem before? I guess it could be the
> server''s mail setup but i thought i''d check just in case
it''s something
> obvious/known :0)
>
> Cheers,
>
> Steve
--
Posted via http://www.ruby-forum.com/.