Created
September 30, 2009 05:15
-
-
Save arbales/197817 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_upload_email(pcode, email) | |
begin | |
@pcode = pcode | |
Pony.mail(:to=>email, | |
:from => 'Pris.ma <[email protected]>', | |
:subject=> "You uploaded a file on Pris.ma!", | |
:body => erb(:upload_email), | |
:via => :smtp, :smtp => { | |
:host => 'smtp.gmail.com', | |
:port => '587', | |
:tls => 'true', | |
:user => '[email protected]', | |
:password => 'happyfuntime', | |
:auth => :plain, | |
:domain => "youraccount.com" | |
}) | |
rescue | |
error(500, "Sorry, we could't send an e-mail to your address, check the spelling or delete it to skip-it.") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment