Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Mojolicius - validate login account by email

by pazt (Acolyte)
on Sep 09, 2016 at 21:00 UTC ( [id://1171485]=perlquestion: print w/replies, xml ) Need Help??

pazt has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I'm trying follow the "How to send verification emails using Mojolicious" tutorial by, Joel Berger.

Everythig seems that is ok, but the email isn't sent by app.pl

And when i check ./app.pl minion worker and ./myapp.pl minion job <<id>> everything seems ok again.

{ "args" => [ "thiagopaz1986\@gmail.com", "Confirm registration", "Please visit http://192.168.56.30:3000/confirm?jwt=eyJhbGciOiJIUz +I1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImZyZWQifQ.hqRpEjfmu5r-pnCcHYK +n29G27AVOz_rtjLpNrPoXoxE to confirm" ], "attempts" => 1, "children" => [], "created" => "1473314401", "delayed" => "1473314401", "finished" => "1473446944", "id" => 7, "parents" => [], "priority" => 0, "queue" => "default", "result" => undef, "retried" => undef, "retries" => 0, "started" => "1473446939", "state" => "finished", "task" => "email_task", "worker" => 1 }

But email is not sent

Just for testing, I created another script with Email::Simple and Email::Sender::Simple only and the email was sent successfully.

#!/usr/bin/perl -w use strict; use Email::Simple; use Email::Sender::Simple; my $email = Email::Simple->create( header => [ To => 'thiagopaz1986@gmail.com', From => 'sdpdeteste@bol.com.br', Subject => 'Mojo teste' , ], body => 'Hello monks', ); Email::Sender::Simple->send($email);

Can any monk help me please? Is this has happened to someone?

Replies are listed 'Best First'.
Re: Mojolicius - validate login account by email
by Anonymous Monk on Sep 10, 2016 at 00:27 UTC
    Turn on logging and debugging, then check the logs :)

      Using morbo, debug return the lines below:

      pazt@mojo:~/theo$ morbo myapp.pl Server available at http://127.0.0.1:3000 [Sun Sep 11 02:12:43 2016] [debug] POST "/sign_up" [Sun Sep 11 02:12:43 2016] [debug] Routing to a callback [Sun Sep 11 02:12:43 2016] [debug] Your secret passphrase needs to be +changed [Sun Sep 11 02:12:43 2016] [debug] 302 Found (0.041378s, 24.167/s) [Sun Sep 11 02:12:43 2016] [debug] GET "/" [Sun Sep 11 02:12:43 2016] [debug] Routing to a callback [Sun Sep 11 02:12:43 2016] [debug] Rendering template "index.html.ep" +from DATA + section [Sun Sep 11 02:12:43 2016] [debug] 200 OK (0.005431s, 184.128/s)

      postfix is installed on my server to send emails.


        I think you want to look at the Minion log, as that is the one actually trying to send the mail and marking the mail job as "done".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1171485]
Approved by shmem
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-25 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found