Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Sending email, would like a success (or failure) page to display

by choroba (Cardinal)
on Jun 13, 2015 at 20:04 UTC ( [id://1130316]=note: print w/replies, xml ) Need Help??


in reply to Sending email, would like a success (or failure) page to display

As the documentation says, the success object is returned from the sendmail subroutine.
if (sendmail($email)) { # On success }

Without success, the subroutine thows an exception, i.e. dies. Therefore, without evaling the subroutine (or using something like Try::Tiny), you don't have to check the success.

if (eval { sendmail($email) }) { # On success... } else { # On failure }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Sending email, would like a success (or failure) page to display
by tonto (Friar) on Jun 13, 2015 at 20:19 UTC

    Thank you!

    I read the documentation but I didn't understand how to apply it, I am wiser now.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2025-11-12 20:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (68 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.