SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

classic Classic list List threaded Threaded
11 messages Options
lsm
Reply | Threaded
Open this post in threaded view
|

SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

lsm
My configuration in mojomojo.conf includes

email    SMTP
email    192.168.4.2

MojoMojo is running on a webserver.  In the shell on that webserver, I can:

telnet 192.168.4.2 25

and talk to the email server.

With the above configuration, shouldn't MojoMojo be able to talk to the email server and send email?  Or am I missing something?  

tcpdump reports no packets generated.  Even when I set email to localhost, I see no local packets generated.  this is not a firewall issue.

debug reports:

[debug] C::V::Email::Template uses default view MojoMojo::View::TT=HASH(0x4909768) for rendering.
[debug] C::V::Email uses default content_type text/plain.
[debug] Rendering template "mail/reset_password.tt"
[debug] C::V::Email uses specified content_type text/plain.
[debug] Rendering template "user/recover_pass.tt"
[info] Request took 0.210454s (4.752/s)

Is some other facility required to support email in MojoMojo?
Reply | Threaded
Open this post in threaded view
|

Re: [MojoMojo] SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

Rodrigo-7

With the above configuration, shouldn't MojoMojo be able to talk to the
email server and send email?  Or am I missing something?


I'm having a similar problem. No mails sent, nothing reported to the logs. I'm on MojoMojo 0.999042 on perl 5.10.1 on AIX.


_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
lsm
Reply | Threaded
Open this post in threaded view
|

Re: [MojoMojo] SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

lsm
It looks like Catalyst::View::Email just migrated from Email::Send to Email::Sender

Various Catalyst::View::Email tutorials and example code is now broken.

It seems you have to pass in an explicit "header" hash, rather than the individual header components.

i.e.,

before:

$c->stash->{email} = {
  to => 'recipient@recipient.com',
  from => 'sender@sender.com',
  subject => 'subject',
  body => 'body',
}

after:

$c->stash->{email} = {
  header => [
    to => 'recipient@recipient.com',
    from => 'sender@sender.com',
    subject => 'subject',
  ],
  body => 'body',
}

I surmise that the MojoMojo internals (and those of a lot of packages) may have to change, to keep using Catalyst::View::Email.  Or Catalyst::View::Email needs to handle legacy inputs?

FYI, I haven't confirmed this is the specific problem with MojoMojo, but other packages I'm using seem to have broken -- and I have fixed -- in precisely this manner.
Reply | Threaded
Open this post in threaded view
|

Re: [MojoMojo] SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

Mateu X Hunter
In reply to this post by lsm
I have solid luck with postfix installed and:

  email   SMTP
  email   localhost
  system_mail Default Installation <[hidden email]>

for the mail config in mojomojo.conf




>
> My configuration in mojomojo.conf includes
>
> email    SMTP
> email    192.168.4.2
>
> MojoMojo is running on a webserver.  In the shell on that webserver, I
> can:
>
> telnet 192.168.4.2 25
>
> and talk to the email server.
>
> With the above configuration, shouldn't MojoMojo be able to talk to the
> email server and send email?  Or am I missing something?
>
> tcpdump reports no packets generated.  Even when I set email to localhost,
> I
> see no local packets generated.  this is not a firewall issue.
>
> debug reports:
>
> [debug] C::V::Email::Template uses default view
> MojoMojo::View::TT=HASH(0x4909768) for rendering.
> [debug] C::V::Email uses default content_type text/plain.
> [debug] Rendering template "mail/reset_password.tt"
> [debug] C::V::Email uses specified content_type text/plain.
> [debug] Rendering template "user/recover_pass.tt"
> [info] Request took 0.210454s (4.752/s)
>
> Is some other facility required to support email in MojoMojo?
> --
> View this message in context:
> http://n2.nabble.com/SMTP-mail-settings-tried-both-localhost-and-mailserver-in-mojomojo-conf-tp4468666p4468666.html
> Sent from the mojomojo mailing list archive at Nabble.com.
>
> _______________________________________________
> Mojomojo mailing list
> [hidden email]
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>



_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
Reply | Threaded
Open this post in threaded view
|

Re: SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

Diego Kuperman
On 1/28/10 1:56 AM, Larry Marso wrote:
> Indeed, that does the trick.  Thank you.
>
Excellent!

> Is there any input into mojomojo_local.conf that
> would reproduce this lower level configuration?
>  
hm, I think this will do it:

<View::Email>
    <sender>
        mailer SMTP
        <mailer_args>
            host 192.168.4.2
        </mailer_args>
    </sender>
</View::Email>

I'm not sure as I'm more a yaml guy. If it work I'm not sure if there is
a nicer way to write that, so: does it work for you?, does someone knows
if there is a nicer way to write that?... I would like to update the
default config on the repo to show that instead of the current buggy one ;)

-dk

> Regards
>
> On Thu, Jan 28, 2010 at 01:46:02AM -0300, Diego Kuperman wrote:
>> Hello!,
>>
>> On 1/27/10 10:33 PM, Mateu X. Hunter wrote:
>>> I have solid luck with postfix installed and:
>>>
>>>   email   SMTP
>>>   email   localhost
>>>   system_mail Default Installation <[hidden email]>
>>>
>>> for the mail config in mojomojo.conf
>>>
>> hm, it seems that it works for you (and for me) because default config
>> from MojoMojo::View::Email is helping you:
>>
>> http://github.com/marcusramberg/mojomojo/blob/master/lib/MojoMojo/View/Email.pm
>>
>> (sending from localhost)
>>
>> I'm not sure, but following the email plugin docs, the config should be
>> diferent (as they need a diferent host):
>>
>> __PACKAGE__->config(
>>         'View::Email' => {
>>             sender => {
>>                 mailer => 'SMTP',
>>                 mailer_args => {
>>                     host     => '192.168.4.2'
>>             }
>>           }
>>         }
>>     );
>>
>> http://search.cpan.org/~dhoss/Catalyst-View-Email-0.20/lib/Catalyst/View/Email.pm#CONFIGURATION
>>
>> I didn't tested myself, but it looks reasonable to me. Please tell me if
>> this make it work so I can update my config too :p
>>
>> -dk
>>
>>>
>>>
>>>
>>>>
>>>> My configuration in mojomojo.conf includes
>>>>
>>>> email    SMTP
>>>> email    192.168.4.2
>>>>
>>>> MojoMojo is running on a webserver.  In the shell on that webserver, I
>>>> can:
>>>>
>>>> telnet 192.168.4.2 25
>>>>
>>>> and talk to the email server.
>>>>
>>>> With the above configuration, shouldn't MojoMojo be able to talk to the
>>>> email server and send email?  Or am I missing something?
>>>>
>>>> tcpdump reports no packets generated.  Even when I set email to localhost,
>>>> I
>>>> see no local packets generated.  this is not a firewall issue.
>>>>
>>>> debug reports:
>>>>
>>>> [debug] C::V::Email::Template uses default view
>>>> MojoMojo::View::TT=HASH(0x4909768) for rendering.
>>>> [debug] C::V::Email uses default content_type text/plain.
>>>> [debug] Rendering template "mail/reset_password.tt"
>>>> [debug] C::V::Email uses specified content_type text/plain.
>>>> [debug] Rendering template "user/recover_pass.tt"
>>>> [info] Request took 0.210454s (4.752/s)
>>>>
>>>> Is some other facility required to support email in MojoMojo?
>>>> --
>>>> View this message in context:
>>>> http://n2.nabble.com/SMTP-mail-settings-tried-both-localhost-and-mailserver-in-mojomojo-conf-tp4468666p4468666.html
>>>> Sent from the mojomojo mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> Mojomojo mailing list
>>>> [hidden email]
>>>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Mojomojo mailing list
>>> [hidden email]
>>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>>
>> _______________________________________________
>> Mojomojo mailing list
>> [hidden email]
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>
> _______________________________________________
> Mojomojo mailing list
> [hidden email]
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo

_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
lsm
Reply | Threaded
Open this post in threaded view
|

Re: SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

lsm
I believe I've already tried exactly that.  Didn't work.

On Thu, Jan 28, 2010 at 03:27:41AM -0300, Diego Kuperman wrote:
> <View::Email>
>     <sender>
>         mailer SMTP
>         <mailer_args>
>             host 192.168.4.2
>         </mailer_args>
>     </sender>
> </View::Email>

_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
Reply | Threaded
Open this post in threaded view
|

Re: SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

Diego Kuperman
On 1/28/10 3:34 AM, Larry Marso wrote:

> I believe I've already tried exactly that.  Didn't work.
>
> On Thu, Jan 28, 2010 at 03:27:41AM -0300, Diego Kuperman wrote:
>> <View::Email>
>>     <sender>
>>         mailer SMTP
>>         <mailer_args>
>>             host 192.168.4.2
>>         </mailer_args>
>>     </sender>
>> </View::Email>
>
Hm!, weird... I just tested using Config::General and it dumps just the
same as before:

$VAR1 = {
    'View::Email' => {
        'sender' => {
             'mailer' => 'SMTP',
             'mailer_args' => {
                 'host' => '192.168.4.2'
            }
        }
    }
};

-dk

_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
Reply | Threaded
Open this post in threaded view
|

Re: SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

Mateu X Hunter
In reply to this post by Mateu X Hunter
> Indeed, that does the trick.  Thank you.
>
> Is there any input into mojomojo_local.conf that
> would reproduce this lower level configuration?

You can put the same lines in mojomojo_local.conf to preserve it when
upgrading mojomojo.

- M

>
> Regards
>
> On Thu, Jan 28, 2010 at 01:46:02AM -0300, Diego Kuperman wrote:
>> Hello!,
>>
>> On 1/27/10 10:33 PM, Mateu X. Hunter wrote:
>> > I have solid luck with postfix installed and:
>> >
>> >   email   SMTP
>> >   email   localhost
>> >   system_mail Default Installation <[hidden email]>
>> >
>> > for the mail config in mojomojo.conf
>> >
>> hm, it seems that it works for you (and for me) because default config
>> from MojoMojo::View::Email is helping you:
>>
>> http://github.com/marcusramberg/mojomojo/blob/master/lib/MojoMojo/View/Email.pm
>>
>> (sending from localhost)
>>
>> I'm not sure, but following the email plugin docs, the config should be
>> diferent (as they need a diferent host):
>>
>> __PACKAGE__->config(
>>         'View::Email' => {
>>             sender => {
>>                 mailer => 'SMTP',
>>                 mailer_args => {
>>                     host     => '192.168.4.2'
>>             }
>>           }
>>         }
>>     );
>>
>> http://search.cpan.org/~dhoss/Catalyst-View-Email-0.20/lib/Catalyst/View/Email.pm#CONFIGURATION
>>
>> I didn't tested myself, but it looks reasonable to me. Please tell me if
>> this make it work so I can update my config too :p
>>
>> -dk
>>
>> >
>> >
>> >
>> >>
>> >> My configuration in mojomojo.conf includes
>> >>
>> >> email    SMTP
>> >> email    192.168.4.2
>> >>
>> >> MojoMojo is running on a webserver.  In the shell on that webserver,
>> I
>> >> can:
>> >>
>> >> telnet 192.168.4.2 25
>> >>
>> >> and talk to the email server.
>> >>
>> >> With the above configuration, shouldn't MojoMojo be able to talk to
>> the
>> >> email server and send email?  Or am I missing something?
>> >>
>> >> tcpdump reports no packets generated.  Even when I set email to
>> localhost,
>> >> I
>> >> see no local packets generated.  this is not a firewall issue.
>> >>
>> >> debug reports:
>> >>
>> >> [debug] C::V::Email::Template uses default view
>> >> MojoMojo::View::TT=HASH(0x4909768) for rendering.
>> >> [debug] C::V::Email uses default content_type text/plain.
>> >> [debug] Rendering template "mail/reset_password.tt"
>> >> [debug] C::V::Email uses specified content_type text/plain.
>> >> [debug] Rendering template "user/recover_pass.tt"
>> >> [info] Request took 0.210454s (4.752/s)
>> >>
>> >> Is some other facility required to support email in MojoMojo?
>> >> --
>> >> View this message in context:
>> >> http://n2.nabble.com/SMTP-mail-settings-tried-both-localhost-and-mailserver-in-mojomojo-conf-tp4468666p4468666.html
>> >> Sent from the mojomojo mailing list archive at Nabble.com.
>> >>
>> >> _______________________________________________
>> >> Mojomojo mailing list
>> >> [hidden email]
>> >> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>> >>
>> >
>> >
>> >
>> > _______________________________________________
>> > Mojomojo mailing list
>> > [hidden email]
>> > http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>>
>> _______________________________________________
>> Mojomojo mailing list
>> [hidden email]
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>
> _______________________________________________
> Mojomojo mailing list
> [hidden email]
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>



_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
Reply | Threaded
Open this post in threaded view
|

Re: SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

Diego Kuperman
In reply to this post by lsm
Could you update Catalyst::View::Email to 0.21 (released today) and
check again?

-dk


On 1/28/10 3:34 AM, Larry Marso wrote:

> I believe I've already tried exactly that.  Didn't work.
>
> On Thu, Jan 28, 2010 at 03:27:41AM -0300, Diego Kuperman wrote:
>> <View::Email>
>>     <sender>
>>         mailer SMTP
>>         <mailer_args>
>>             host 192.168.4.2
>>         </mailer_args>
>>     </sender>
>> </View::Email>
>
> _______________________________________________
> Mojomojo mailing list
> [hidden email]
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo

_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
lsm
Reply | Threaded
Open this post in threaded view
|

Re: SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

lsm
Sorry for the delay (traveling).  I see that Catalyst::View::Email is
up to 0.22 now.

It works now, specifying an email server at another accessible machine
(not localhost), using the specification in mojomojo_local.conf

<View::Email>
   <sender>
       mailer SMTP
       <mailer_args>
           host 192.168.4.2
       </mailer_args>
   </sender>
</View::Email>

and commenting out the email and system_email lines with the defaults.

Thank you so much.

On Thu, Jan 28, 2010 at 1:23 PM, Diego Kuperman <[hidden email]> wrote:

> Could you update Catalyst::View::Email to 0.21 (released today) and
> check again?
>
> -dk
>
>
> On 1/28/10 3:34 AM, Larry Marso wrote:
>> I believe I've already tried exactly that.  Didn't work.
>>
>> On Thu, Jan 28, 2010 at 03:27:41AM -0300, Diego Kuperman wrote:
>>> <View::Email>
>>>     <sender>
>>>         mailer SMTP
>>>         <mailer_args>
>>>             host 192.168.4.2
>>>         </mailer_args>
>>>     </sender>
>>> </View::Email>
>>
>> _______________________________________________
>> Mojomojo mailing list
>> [hidden email]
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>
> _______________________________________________
> Mojomojo mailing list
> [hidden email]
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
>

_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo
Reply | Threaded
Open this post in threaded view
|

Re: SMTP mail settings (tried both localhost and mailserver) in mojomojo.conf

Diego Kuperman
On 1/29/10 9:34 PM, Larry Marso wrote:

> Sorry for the delay (traveling).  I see that Catalyst::View::Email is
> up to 0.22 now.
>
> It works now, specifying an email server at another accessible machine
> (not localhost), using the specification in mojomojo_local.conf
>
> <View::Email>
>    <sender>
>        mailer SMTP
>        <mailer_args>
>            host 192.168.4.2
>        </mailer_args>
>    </sender>
> </View::Email>
>
great!, I'll update the default conf on the repo to look like this (but
using localhost).

> and commenting out the email and system_email lines with the defaults.
>
Hm, you shouldn't comment out the system_email line, it's in use on the
"From" header:

http://github.com/marcusramberg/mojomojo/blob/84a030ce9f1f337b9a15c5fcd7f5feb0f667a7b6/lib/MojoMojo/Controller/User.pm#L194

-dk


_______________________________________________
Mojomojo mailing list
[hidden email]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/mojomojo