Ruby

Ruby allows you to simply send emails through an SMTP library: mail

To install mail, we will use gem.

gem install mail

You can now use the library in your application. Here is a code example that you can adapt

				/*
				  * File Name : send.rb
				  * Task : send email through Tipimail
				 */

				require 'mail'

				Mail.defaults do
					delivery_method :smtp, {
						:port      => 587,
						:address   => "smtp.tipimail.com",
						:user_name => "username",
						:password  => "password"
					}
				end

				mail = Mail.deliver do
					from    'contact@mail.tipimail.com'
					to      'to@mail.tipimail.com'
					subject 'sujet de votre email'

					text_part do
						body 'Message au format texte'
					end

					html_part do
						content_type 'text/html; charset=UTF-8'
						body 'Message au format html'
					end
				end

			

Call the script

ruby send.rb