Created
September 30, 2009 05:15
-
-
Save arbales/197815 to your computer and use it in GitHub Desktop.
This file contains 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 <do-not-reply@pris.ma>', | |
:subject=> "You uploaded a file on Pris.ma!", | |
:body => erb(:upload_email), | |
:via => :smtp, :smtp => { | |
:host => 'smtp.gmail.com', | |
:port => '587', | |
:tls => 'true', | |
:user => 'do-not-reply@youraccount.com', | |
: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