A Simple Guide to Send Emails from a Program

November 14, 2016 | Views: 5328

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

As a result of Juliar’s  latest update, you can now send raw emails via *raw_email * command that sends an email to a user using SMTP protocol. (Download the latest Juliar at https://www.juliar.org)

What is a raw email?

In a raw email, you have to write everything to send to the server.

Here is the command:

*raw_email
From: "Ben" <ben@example.com>
To: J <j@example.com>
Cc: friend@example.com
Date: Tue, 15 January 2016 16:02:43 -0500
Subject: Test message
 
Hello J,
This is an important message.
Ben

*

 

You can modify the From and Date fields to anything you want.

While you can name yourself any way you want and change the date, realize that most servers will use their own date and time and the from field domain must match the SMTP server you are using.  Otherwise,  you will risk your email being lost in cyberspace.

Using *raw_email * with and without optionals

If you are using *raw_email* without optionals, Juliar will use its built-in server to send emails. This is OK if you are sending an email to your computer or a computer in a local network. However,  it is not recommended if you are sending an email to Gmail server for example, as most servers block requests that originated from home IP addresses or addresses that are not one of the big companies. The reason for that is simple, SPAM blocking measurement. You can thank advertisers and spammers for that…

SMTP servers

Usually, most SMTP servers use port 25, you can find a list of SMTP servers at https://www.arclab.com/en/kb/email/list-of-smtp-and-pop3-servers-mailserver-list.html

or you can google for SMTP server. For MOST SMTP servers, you will need a username and password as well as SSL connection. Juliar will soon support SSL, but for now, try to find a server with no SSL connection.

*raw_email * Optionals

Here are optionals for *Juliar * *raw_email * command: *raw_email=smtp server, username of smtp server, password    info *

An example of raw_email with optionals:

 

*raw_email=smtp.secureserver.net:25,rattar,mypassword
From: "Ben" <ben@example.com>
To: J <j@example.com>
Cc: friend@example.com
Date: Tue, 15 January 2016 16:02:43 -0500
Subject: Test message
 
Hello J,
This is an important message.
Ben

*

 

Thanks for all the support and remember to check out Juliar for official news at https://www.juliar.org and forums at https://www.juliar.org/forums

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
8 Comments
  1. Tried to install in ubuntu 14.04.5. It said Command “raw_email” not found!

  2. from what i know, i used to mail using a command mailx to send out mails via commqnd line interface, but it will look like a normal email when received by recepient

    • Definitely. You can use other commands. The thing is
      1) Juliar runs this on every operating system
      2) This is pretty much a raw format for email (exactly what the Email Server will see) . Of course, behind the scenes Juliar has to extract from, to information (but that’s just a simple abstraction)
      3) Juliar also provides *mail * command which is similar to mailx.

  3. This looks pretty cool. I use a program I wrote in C# to do this and have been using it for a few years. Has a gui message editor and a few other features I added over time. Most pre-built libraries require you to specify message parts and it does the formatting for you which is not what I wanted (especially if you need to test a very specific mime formatting or bugs). So I had to write my own to be able to send raw messages. Might just have to check this out.

Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel