How to send an email in one line without creating an email program class?
I need to set all parameters, including: from (which is different from smtp user)
So far, I got this:
# ok not exactly a one liner, but it doesn't matter ActionMailer::Base.mail(:from => ' admin@mysite.me ', :to => ' someone@gmail.com ', :subject => 'subject bla') do 'content bla' end.deliver
Content does not work, I get an empty email
ActionMailer::Base.mail(from: ' from@domain.com ', to: ' to@domain.com ', subject: "Welcome to My Awesome Site", body: 'I am the email body.').deliver
Omg, we have one line!
Source: https://habr.com/ru/post/909836/More articles:Create custom tab in C # WinForms? - c #Android error: you must specify the layout_width attribute - androidextern "C" char ** environ - Windows - C ++ / CLI - portingSearch for duplicate orders (by time proximity) - sqlIf I use two user annotations in jsr 303, how do I stop validation for the second annotation if the validation fails first? - javaManually set the column name in the rails model - ruby-on-rails-3ASP.NET Web Api in Web Forms - c #Updating a huge number of Joomla sites - phpDjango-South DataMigration - is the application available in forward () but not backward ()? - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/909841/viewedit-work-items-and-deny-access-to-source-code-in-tfs-2010&usg=ALkJrhgJk7kI6YAGZHbLqNbwQdRB7se8DgAll Articles