Arquivo da tag: email

Módulo Smtp com modelo de Html

Módulo Smtp com modelo de Html

Módulo Smtp com modelo de Html

Todas as vezes que crio um novo projeto que precisa enviar emails acabo indo atrás de projetos anteriores e faço o famoso ctrl+C, ctrl+V mas recentemente cansei desse hábito horrendo e decidi criar uma biblioteca simples que pode ser referenciada em qualquer projeto.

Caso esteja com pressa, baixe a biblioteca aqui, ou o demo completo aqui.

Página do projeto no Github

Para testar o módulo, use Smtp4Dev.

Para começar, criei a classe que gerencia o SmtpClient e SmtpServer:

using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Web.Hosting;

namespace Simple_Mail
{
    #region Enums
    /// <summary>
    /// Types of Emails that can be sent
    /// </summary>
    public enum EmailType
    {
        Default,
        Confirmation,
        Forgotten,
        Welcome,
        Error
    }
    /// <summary>
    /// Type of Application this module is being ran from
    /// </summary>
    public enum ApplicationType
    {
        Desktop,
        Web
    }
    #endregion

    #region Class
    /// <summary>
    /// Email Module Class
    /// </summary>
    public class Email
    {
        #region Public Members
        // <summary>
        /// The Email address of the Email Module Admin
        /// </summary>
        public string SITE_ADMIN { get; set; }
        /// <summary>
        /// Subject of the Email
        /// </summary>
        public string SUBJECT { get; set; }
        /// <summary>
        /// Body of the Email (default is html)
        /// </summary>
        public string BODY { get; set; }
        /// <summary>
        /// From Email Address (who's sending the email)
        /// </summary>
        public string FROM { get; set; }
        /// <summary>
        /// From Name (name of who is sending the email)
        /// </summary>
        public string FROM_NAME { get; set; }
        /// <summary>
        /// To Email Address (who is going to receive this email)
        /// </summary>
        public string TO { get; private set; }
        /// <summary>
        /// To Name (name of who is going to receive this email)
        /// </summary>
        public string TO_NAME { get; set; }
        /// <summary>
        /// Username of Smtp Service / Server
        /// </summary>
        public string USERNAME { get; private set; }
        /// <summary>
        /// Password for the smtp service / server
        /// </summary>
        public string PASSWORD { get; private set; }
        /// <summary>
        /// The port number for sending the email address (normal ports are 25, 587, 465)
        /// </summary>
        public int PORT { get; private set; }
        /// <summary>
        /// Whether to use SSL Encryption
        /// </summary>
        public bool USESSL { get; private set; }
        /// <summary>
        /// Uri of the Smtp Server
        /// </summary>
        public string SERVER { get; private set; }
        /// <summary>
        /// Whether the smtp server requires authentication
        /// </summary>
        public bool REQUIREAUTH { get; private set; }
        /// <summary>
        /// Name of the Website or App running the Module
        /// </summary>
        public string WEBSITE_NAME { get; set; }
        /// <summary>
        /// Default Html Body for the Email
        /// </summary>
        public string HTML_DEFAULT { get; private set; }
        /// <summary>
        /// Html body for the Forgotten Email
        /// </summary>
        public string HTML_FORGOTEN { get; private set; }
        /// <summary>
        /// Html Body for the Confirmation Email
        /// </summary>
        public string HTML_CONFIRMATION { get; private set; }
        /// <summary>
        /// Html Body for the Welcome Email
        /// </summary>
        public string HTML_WELCOME { get; private set; }
        /// <summary>
        /// Html for the Social Share
        /// </summary>
        public string HTML_SHARE_PATH { get; private set; }
        /// <summary>
        /// Path for the Default Html File
        /// </summary>
        public string HTML_DEFAULT_PATH { get; private set; }
        /// <summary>
        /// Path for the Forgotten Html File
        /// </summary>
        public string HTML_FORGOTEN_PATH { get; private set; }
        /// <summary>
        /// Path for the Confirmation Html File
        /// </summary>
        public string HTML_CONFIRMATION_PATH { get; private set; }
        /// <summary>
        /// Path for the Welcome Html File
        /// </summary>
        public string HTML_WELCOME_PATH { get; private set; }
        /// <summary>
        /// Path for the Social Share Html File
        /// </summary>
        public string HTML_SHARE { get; private set; }
        #endregion

        #region Constructors
        /// <summary>
        /// Manually configures a Smtp Server Instance (when you do not want to use config files)
        /// </summary>
        /// <param name="smtpServer">The Uri for the smtp server</param>
        /// <param name="smtpPort">The Smtp Port</param>
        /// <param name="useAuth">Whether the Smtp Server Requires Authentication</param>
        /// <param name="username">The Smtp Username</param>
        /// <param name="password">The Smtp Password</param>
        /// <param name="useSSL">Whether to Use SSL Encryption</param>
        public Email(string smtpServer, int smtpPort, bool useAuth = false, string username = "", string password = "", bool useSSL = false)
        {
            SERVER = smtpServer;
            PORT = smtpPort;
            REQUIREAUTH = useAuth;
            USERNAME = username;
            PASSWORD = password;
            USESSL = useSSL;
        }
        /// <summary>
        /// Instanciates a new Email Module based on Config Files and Application Type (Web or Desktop)
        /// </summary>
        /// <param name="type"></param>
        public Email(ApplicationType type)
        {
            switch (type)
            {
                case ApplicationType.Desktop:
                    HTML_CONFIRMATION_PATH = ConfigurationManager.AppSettings["email-html-confirmation"];
                    HTML_WELCOME_PATH = ConfigurationManager.AppSettings["email-html-welcome"];
                    HTML_FORGOTEN_PATH = ConfigurationManager.AppSettings["email-html-forgotten"];
                    HTML_DEFAULT_PATH = ConfigurationManager.AppSettings["email-html-default"];
                    HTML_SHARE_PATH = ConfigurationManager.AppSettings["email-html-share"];
                    break;
                case ApplicationType.Web:
                    HTML_CONFIRMATION_PATH = HostingEnvironment.MapPath(ConfigurationManager.AppSettings["email-html-confirmation"]);
                    HTML_WELCOME_PATH = HostingEnvironment.MapPath(ConfigurationManager.AppSettings["email-html-welcome"]);
                    HTML_FORGOTEN_PATH = HostingEnvironment.MapPath(ConfigurationManager.AppSettings["email-html-forgotten"]);
                    HTML_DEFAULT_PATH = HostingEnvironment.MapPath(ConfigurationManager.AppSettings["email-html-default"]);
                    HTML_SHARE_PATH = HostingEnvironment.MapPath(ConfigurationManager.AppSettings["email-html-share"]);
                    break;
                default:
                    break;
            }


            HTML_CONFIRMATION = GetEmailHtml(HTML_CONFIRMATION_PATH);
            HTML_WELCOME = GetEmailHtml(HTML_DEFAULT_PATH);
            HTML_FORGOTEN = GetEmailHtml(HTML_FORGOTEN_PATH);
            HTML_DEFAULT = GetEmailHtml(HTML_WELCOME_PATH);
            HTML_SHARE = GetEmailHtml(HTML_SHARE_PATH);


            WEBSITE_NAME = ConfigurationManager.AppSettings["WebsiteName"];

            SITE_ADMIN = ConfigurationManager.AppSettings["siteadmin"];

            SERVER = ConfigurationManager.AppSettings["email-server"];
            PORT = int.Parse(ConfigurationManager.AppSettings["email-port"]);
            USESSL = bool.Parse(ConfigurationManager.AppSettings["useSSL"]);
            PASSWORD = ConfigurationManager.AppSettings["email-password"];
            USERNAME = ConfigurationManager.AppSettings["email-username"];
            REQUIREAUTH = bool.Parse(ConfigurationManager.AppSettings["email-require-auth"]);

            TO_NAME = "New " + ConfigurationManager.AppSettings["WebsiteName"] + " Member";
            TO = ConfigurationManager.AppSettings["email-to"];
            FROM_NAME = ConfigurationManager.AppSettings["email-from-name"];
            FROM = ConfigurationManager.AppSettings["email-from"];

            SUBJECT = ConfigurationManager.AppSettings["email-subject"];


        }

        #endregion

        #region Private Members

        private EmailType emailMessageType;
        private string emailMessageHtml;
        private System.Net.Mail.SmtpClient SmtpServer;
        #endregion

        #region Private Methods
        private string GetEmailHtml(string path)
        {
            return File.ReadAllText(path);
        }

        private string GetEmailFilePath(EmailType type)
        {
            emailMessageType = type;

            switch (type)
            {
                case EmailType.Confirmation:
                    emailMessageHtml = HTML_CONFIRMATION;
                    break;
                case EmailType.Forgotten:
                    emailMessageHtml = HTML_FORGOTEN;
                    break;
                case EmailType.Welcome:
                    emailMessageHtml = HTML_WELCOME;
                    break;
                case EmailType.Default:
                    emailMessageHtml = HTML_DEFAULT;
                    break;
                default:
                    emailMessageHtml = "";
                    break;
            }
            return emailMessageHtml;
        }

        private bool SetupServer()
        {
            try
            {
                SmtpServer = new System.Net.Mail.SmtpClient();
                SmtpServer.Port = PORT;
                SmtpServer.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
                if (REQUIREAUTH)
                {
                    SmtpServer.UseDefaultCredentials = false;
                    SmtpServer.Credentials = new System.Net.NetworkCredential(USERNAME, PASSWORD);
                }
                else SmtpServer.UseDefaultCredentials = true;

                SmtpServer.Host = SERVER;
                SmtpServer.EnableSsl = USESSL;

                return true;
            }
            catch
            {

                return false;
            }
        }

        #endregion

        #region Public Methods
        /// <summary>
        /// Attempts to send an email
        /// </summary>
        /// <param name="type">The Type of Email Being Sent</param>
        /// <param name="custom">Whether to Customize the email</param>
        /// <param name="body">If customized, set the html body for the email</param>
        /// <param name="To">If customized, defines the TO field</param>
        /// <param name="ToName">If customized, defines the To name</param>
        /// <returns>Returns a KeyValuePair<bool,string> with success (true/false) and a message from the smtp server</returns>
        public KeyValuePair<bool, string> SendMail(EmailType type, bool custom = false, string body = "", string To = "", string ToName = "New Member")
        {

            if (SetupServer())
            {
                System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();

                mail.Subject = SUBJECT;
                mail.From = new System.Net.Mail.MailAddress(FROM, FROM_NAME);
                mail.IsBodyHtml = true;

                if (ToName != "") TO_NAME = ToName;

                if (To == "") mail.To.Add(new System.Net.Mail.MailAddress(TO, TO_NAME));
                else mail.To.Add(new System.Net.Mail.MailAddress(To, TO_NAME));

                if (custom)
                    mail.Body = body;
                else
                {
                    BODY = GetEmailFilePath(type);
                    mail.Body = BODY;
                }

                try
                {
                    SmtpServer.Send(mail);
                    return new KeyValuePair<bool, string>(true, "Email sent succesfully");
                }
                catch (Exception ex)
                {
                    return new KeyValuePair<bool, string>(false, ex.Message);
                }
                finally
                {
                    SmtpServer.Dispose();
                }
            }
            else return new KeyValuePair<bool, string>(false, "Error Setting UP Email");

        }
        /// <summary>
        /// Manually Sets the Body for the Email Message
        /// </summary>
        /// <param name="message">The Html Body for the Email</param>
        public void SetBody(string message)
        {
            BODY = message;
        }
        #endregion

    } 
    #endregion
}

Também inclui algumas configurações no App.Config como modelo, que podem ser usadas no Web.Config caso não queira inserir os dados via código.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <!--email provider section-->
    <add key="siteadmin" value="postmaster@simpleemail.com"/>
    <add key="email-subject" value="Email from Email Website"/>
    <add key="email-from" value="postmaster@puul.ga"/>
    <add key="email-from-name" value="Simple Email"/>
    <add key="email-require-auth" value="false"/>
    <add key="email-username" value="simpleemail"/>
    <add key="email-password" value=""/>
    <add key="email-port" value="3535"/>
    <add key="useSSL" value="false"/>
    <add key="email-server" value="localhost"/>
    <add key="email-html-share" value="~/Email Templates/share.html"/>
    <add key="email-html-default" value="~/Email Templates/default.html"/>
    <add key="email-html-forgotten" value="~/Email Templates/default.html"/>
    <add key="email-html-confirmation" value="~/Email Templates/default.html"/>
    <add key="email-html-welcome" value="~/Email Templates/default.html"/>
  </appSettings>
</configuration>

Mas como também havia interesse em mandar emails em html mais bonitos, usei um modelo do MailChimp™ para ficar mais apresentável. Inclui na pasta de “Email Templates”

<!--MAILCHIMP EMAIL TEMPLATE-->
<!--DON'T CHANGE THE *|VALUES|* AS THEY ARE REPLACED IN THE SERVER - CHANGE THE HTML, TEXT IS AUTOMATICALLY ADDED-->
<td align="center" valign="top" id="bodyCell" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;height: 100%;margin: 0;padding: 10px;width: 100%;border-top: 0;">
    <!-- BEGIN TEMPLATE // -->
						<!--[if gte mso 9]>
						<table align="center" border="0" cellspacing="0" cellpadding="0" width="600" style="width:600px;">
						<tr>
						<td align="center" valign="top" width="600" style="width:600px;">
                          <![endif]-->
                          <table border="0" cellpadding="0" cellspacing="0" width="100%" class="templateContainer" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;border: 0;max-width: 600px !important;">
                            <tbody><tr>
                                <td valign="top" id="templatePreheader" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FAFAFA;border-top: 0;border-bottom: 0;padding-top: 9px;padding-bottom: 9px;"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                    <tbody class="mcnTextBlockOuter">
                                        <tr>
                                            <td valign="top" class="mcnTextBlockInner" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">

                                                <table align="left" border="0" cellpadding="0" cellspacing="0" width="366" class="mcnTextContentContainer" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                    <tbody><tr>

                                                        <td valign="top" class="mcnTextContent" style="padding-top: 9px;padding-left: 18px;padding-bottom: 9px;padding-right: 0;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #656565;font-family: Helvetica;font-size: 12px;line-height: 150%;text-align: left;">

                                                            *|EMAIL_PREVIEW|*
                                                        </td>
                                                    </tr>
                                                </tbody></table>

                                                <table align="right" border="0" cellpadding="0" cellspacing="0" width="197" class="mcnTextContentContainer" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                    <tbody><tr>

                                                        <td valign="top" class="mcnTextContent" style="padding-top: 9px;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #656565;font-family: Helvetica;font-size: 12px;line-height: 150%;text-align: left;">
                                                        </td>
                                                    </tr>
                                                </tbody></table>

                                            </td>
                                        </tr>
                                    </tbody>
                                </table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateHeader" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FFFFFF;border-top: 0;border-bottom: 0;padding-top: 9px;padding-bottom: 0;"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnImageBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                    <tbody class="mcnImageBlockOuter">
                                        <tr>
                                            <td valign="top" style="padding: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnImageBlockInner">
                                                <table align="left" width="100%" border="0" cellpadding="0" cellspacing="0" class="mcnImageContentContainer" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                    <tbody><tr>
                                                        <td class="mcnImageContent" valign="top" style="padding-right: 9px;padding-left: 9px;padding-top: 0;padding-bottom: 0;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">

                                                            <table style="width: 564px;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcpreview-image-uploader"></table>

                                                        </td>
                                                    </tr>
                                                </tbody></table>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table></td>
                            </tr>
                            <tr>
                                <td valign="top" id="templateBody" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FFFFFF;border-top: 0;border-bottom: 2px solid #EAEAEA;padding-top: 0;padding-bottom: 9px;"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                    <tbody class="mcnTextBlockOuter">
                                        <tr>
                                            <td valign="top" class="mcnTextBlockInner" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">

                                                <table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnTextContentContainer">
                                                    <tbody><tr>

                                                        <td valign="top" class="mcnTextContent" style="padding-top: 9px;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">

                                                            <h1 style="display: block;margin: 0;padding: 0;color: #202020;font-family: Helvetica;font-size: 26px;font-style: normal;font-weight: bold;line-height: 125%;letter-spacing: normal;text-align: left;">

                                                                *|HEADER|*

                                                            </h1>

                                                            <p style="margin: 10px 0;padding: 0;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">

                                                                *|FIRSTPARAGRAPH|*
                                                            </p>
                                                            <p style="margin: 10px 0;padding: 0;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">
                                                                *|SECONDPARAGRAPH|*
                                                            </p>
                                                            <p style="margin: 10px 0;padding: 0;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #202020;font-family: Helvetica;font-size: 16px;line-height: 150%;text-align: left;">
                                                                If you need a bit of inspiration, you can 
                                                                <a href="//inspiration.mailchimp.com" class="mc-template-link" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #2BAADF;font-weight: normal;text-decoration: underline;">
                                                                    see what other MailChimp users are doing
                                                                </a>, or <a href="//mailchimp.com/resources/email-design-guide/" class="mc-template-link" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;color: #2BAADF;font-weight: normal;text-decoration: underline;">
                                                                learn about email design
                                                            </a> 
                                                            and blaze your own trail.
                                                        </p>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>

                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td valign="top" id="templateFooter" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;background-color: #FAFAFA;border-top: 0;border-bottom: 0;padding-top: 9px;padding-bottom: 9px;"><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                        <tbody class="mcnFollowBlockOuter">
                            <tr>
                                <td align="center" valign="top" style="padding: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnFollowBlockInner">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowContentContainer" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                        <tbody><tr>
                                            <td align="center" style="padding-left: 9px;padding-right: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                <table border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnFollowContent">
                                                    <tbody><tr>
                                                        <td align="center" valign="top" style="padding-top: 9px;padding-right: 9px;padding-left: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                            <table align="center" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                <tbody><tr>
                                                                    <td align="center" valign="top" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                    <!--[if mso]>
                                    <table align="center" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <![endif]-->

                                        <!--[if mso]>
                                        <td align="center" valign="top">
                                            <![endif]-->


                                            <table align="left" border="0" cellpadding="0" cellspacing="0" style="display: inline;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                <tbody><tr>
                                                    <td valign="top" style="padding-right: 10px;padding-bottom: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnFollowContentItemContainer">
                                                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowContentItem" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                            <tbody><tr>
                                                                <td align="left" valign="middle" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                    <table align="left" border="0" cellpadding="0" cellspacing="0" width="" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                        <tbody><tr>

                                                                            <td align="center" valign="middle" width="24" class="mcnFollowIconContent" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                                <a href="//www.twitter.com/" target="_blank" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><img src="//cdn-images.mailchimp.com/icons/social-block-v2/color-twitter-48.png" style="display: block;border: 0;height: auto;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;" height="24" width="24" class=""></a>
                                                                            </td>
                                                                            
                                                                            
                                                                        </tr>
                                                                    </tbody></table>
                                                                </td>
                                                            </tr>
                                                        </tbody></table>
                                                    </td>
                                                </tr>
                                            </tbody></table>

                                        <!--[if mso]>
                                        </td>
                                        <![endif]-->

                                        <!--[if mso]>
                                        <td align="center" valign="top">
                                            <![endif]-->


                                            <table align="left" border="0" cellpadding="0" cellspacing="0" style="display: inline;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                <tbody><tr>
                                                    <td valign="top" style="padding-right: 10px;padding-bottom: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnFollowContentItemContainer">
                                                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowContentItem" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                            <tbody><tr>
                                                                <td align="left" valign="middle" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                    <table align="left" border="0" cellpadding="0" cellspacing="0" width="" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                        <tbody><tr>

                                                                            <td align="center" valign="middle" width="24" class="mcnFollowIconContent" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                                <a href="//www.facebook.com" target="_blank" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><img src="//cdn-images.mailchimp.com/icons/social-block-v2/color-facebook-48.png" style="display: block;border: 0;height: auto;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;" height="24" width="24" class=""></a>
                                                                            </td>
                                                                            
                                                                            
                                                                        </tr>
                                                                    </tbody></table>
                                                                </td>
                                                            </tr>
                                                        </tbody></table>
                                                    </td>
                                                </tr>
                                            </tbody></table>

                                        <!--[if mso]>
                                        </td>
                                        <![endif]-->

                                        <!--[if mso]>
                                        <td align="center" valign="top">
                                            <![endif]-->


                                            <table align="left" border="0" cellpadding="0" cellspacing="0" style="display: inline;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                <tbody><tr>
                                                    <td valign="top" style="padding-right: 0;padding-bottom: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnFollowContentItemContainer">
                                                        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnFollowContentItem" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                            <tbody><tr>
                                                                <td align="left" valign="middle" style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 9px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                    <table align="left" border="0" cellpadding="0" cellspacing="0" width="" style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                        <tbody><tr>

                                                                            <td align="center" valign="middle" width="24" class="mcnFollowIconContent" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                                                                                <a href="//mailchimp.com" target="_blank" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"><img src="//cdn-images.mailchimp.com/icons/social-block-v2/color-link-48.png" style="display: block;border: 0;height: auto;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;" height="24" width="24" class=""></a>
                                                                            </td>
                                                                            
                                                                            
                                                                        </tr>
                                                                    </tbody></table>
                                                                </td>
                                                            </tr>
                                                        </tbody></table>
                                                    </td>
                                                </tr>
                                            </tbody></table>

                                        <!--[if mso]>
                                        </td>
                                        <![endif]-->

                                    <!--[if mso]>
                                    </tr>
                                    </table>
                                    <![endif]-->
                                </td>
                            </tr>
                        </tbody></table>
                    </td>
                </tr>
            </tbody></table>
        </td>
    </tr>
</tbody></table>

</td>
</tr>
</tbody>
</table><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnDividerBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;table-layout: fixed !important;">
<tbody class="mcnDividerBlockOuter">
    <tr>
        <td class="mcnDividerBlockInner" style="min-width: 100%;padding: 10px 18px 25px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
            <table class="mcnDividerContent" border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width: 100%;border-top-width: 2px;border-top-style: solid;border-top-color: #EEEEEE;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                <tbody><tr>
                    <td style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
                        <span></span>
                    </td>
                </tr>
            </tbody></table>
<!--            
                <td class="mcnDividerBlockInner" style="padding: 18px;">
                <hr class="mcnDividerContent" style="border-bottom-color:none; border-left-color:none; border-right-color:none; border-bottom-width:0; border-left-width:0; border-right-width:0; margin-top:0; margin-right:0; margin-bottom:0; margin-left:0;" />
            -->
        </td>
    </tr>
</tbody>
</table><table border="0" cellpadding="0" cellspacing="0" width="100%" class="mcnTextBlock" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<tbody class="mcnTextBlockOuter">
    <tr>
        <td valign="top" class="mcnTextBlockInner" style="mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">

            <table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="min-width: 100%;border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" class="mcnTextContentContainer">
                <tbody><tr>

                    <td valign="top" class="mcnTextContent" style="padding-top: 9px;padding-right: 18px;padding-bottom: 9px;padding-left: 18px;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;word-break: break-word;color: #656565;font-family: Helvetica;font-size: 12px;line-height: 150%;text-align: center;">

                        <em>Copyright &copy; *|CURRENT_YEAR|* *|LIST:COMPANY|*, All rights reserved.</em>
                        <br>
                        <br>
                        <br>

                    </td>
                </tr>
            </tbody></table>

        </td>
    </tr>
</tbody>
</table></td>
</tr>
</tbody></table>
						<!--[if gte mso 9]>
						</td>
						</tr>
						</table>
						<![endif]-->
                        <!-- // END TEMPLATE -->
                    </td>

Para usar o módulo, instancia-se desta forma

            Email _email = new Email(ApplicationType.Web);
            string defaultHtml = _email.HTML_CONFIRMATION;
            string body = defaultHtml
                .Replace("*|EMAIL_PREVIEW|*", "This is a Simple Email")
                .Replace("*|HEADER|*", "Simple Email Website")
                .Replace("*|FIRSTPARAGRAPH|*", "The message below has been customized")
                .Replace("*|SECONDPARAGRAPH|*", Message)
                .Replace("*|WEBSITE_URL|*", Request.Url.ToString())
                .Replace("*|WEBSITE_NAME|*", _email.WEBSITE_NAME)
                .Replace("*|CURRENT_YEAR|*", DateTime.Now.Year.ToString());


            _email.SendMail(EmailType.Confirmation, true, body, Email);

Basicamente, está criado um módulo que pode ser reusado em outros projetos, sem o horrendo copy/paste. Claro, melhorias sempre podem ser feitas, por isso o projeto é open source e pode ser baixado do Github.

Para testar a funcionalidade, recomendo usar Smtp4Dev que é bastante prático e não requer nem instalação.

Como criar um formulário de contato em Ajax para Umbraco

Como criar um formulário de contato em Ajax para Umbraco

por Carlos Casalicchio

Ao criar uma página responsiva em Umbraco rapidamente encontra-se algumas restrições relativas ao que a atual oferece. E, apesar da comunidade já ter desenvolvido várias coisas úteis, algumas vezes não encontramos o que precisamos.

Por esse motivo acabei por desenvolvendo um formulário de email simples que possibilite o envio de e-mails em Ajax, sem Postback da página.

Para tanto, criei o formulário na página (está fora do escopo discutir o html envolvido na criação do formulário) como na figura:

Como criar um formulário de contato em Ajax para Umbraco

Neste artigo, mostro como criar um formulário de contato em Ajax para Umbraco. O código do formulário é este:

Html

div class="contact_form">
    <div id="note"></div>
    <div id="fields">
        <form id="ajaxSendmail" action="">
            <input type="text" name="name" value="" placeholder="Name" />
            <input type="text" name="email" value="" placeholder="Email" />
            <textarea name="message" id="message" placeholder="Message"></textarea>
            <div class="clear"></div>
            <input type="reset" class="contact_btn" value="Clear Form" />
            <input type="submit" class="contact_btn send_btn" value="Send" />
            <div class="clear"></div>
        </form>
    </div>
</div>

CSS

#note {
            position: relative;
        }

            #note .notification_ok {
                position: absolute;
                top: 0;
                margin-top: 20px;
                padding: 7px 10px;
                text-align: center;
                text-transform: uppercase;
                background: #444;
                font-family: 'Lato', sans-serif;
                font-weight: 400;
                font-size: 14px;
                color: #fff;
            }

            #note .notification_error {
                position: absolute;
                top: 115px;
                font-family: 'Lato', sans-serif;
                font-weight: 400;
                font-size: 16px;
                color: #f00;
            }

Script AJAX

$("#ajaxSendmail").submit(function () {

            $(this).children().each(function () {
                $(this).css("border", "");
            });
            $('#note').html("");

            if ($("input[name='name']").val() === "" || $("input[name='email']").val() === ""
                || $("input[name='message']").val() === "") {
                $("#ajaxSendmail").children().each(function () {
                    if ($(this).val() === "") $(this).css("border", "2px solid #FF0000");
                });

                $('#note').html('<div class="notification_error">All values are required</div>');
                return false;
            }
            else {

                var str = $(this).serialize();

                $.ajax({
                    type: "POST",
                    url: "/SendMail.aspx",
                    data: str,
                    success: function (msg) {
                        // Message Sent - Show the 'Thank You' message and hide the form
                        if (msg.trim() == 'OK') {
                            result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
                            $("#fields").hide();
                        } else {

                            result = msg;
                        }
                        $('#note').html(result);
                    }
                });
                return false;
            }
        });

Para fazer o formulário funcionar, é preciso criar uma página macro (em Razor) que faça o processo de enviar o email:

Razor

@inherits umbraco.MacroEngines.DynamicNodeContext
@{
	var name = Request["name"];
	var email = Request["email"];
	var message = Request["message"];

	string host = "relay-hosting.secureserver.net",
                subject = "Contact Received from Site",
                body = "<h3>{0}</h3><p>From: {1}<br /><br /> Email: {2} </p><p>Message: {3}</p>",
                from = "mailer@zueuz.com",
                to = "email@myemail.com";
            int port = 25;

           System.Net.Mail.SmtpClient SmtpServer = new System.Net.Mail.SmtpClient(host, port);
           System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();

            mail.From = new System.Net.Mail.MailAddress(from, "Corporate Mailer");
            mail.To.Add(new System.Net.Mail.MailAddress(to, "Admin"));
            mail.Subject = subject;
            mail.Body = string.Format(body, subject, name, email, message);
            mail.IsBodyHtml = true;

	try
            {

                SmtpServer.Send(mail);
                <text>OK</text>;
            }
            catch (Exception e)
            {
                <text>@e.Message</text>;
            }

}

E também uma página sendmail
Template

Webforms do Umbraco

<%@  Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

       <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
           <umbraco:macro alias="Sendmail" runat="server"></umbraco:macro>
       </asp:Content>

Com esses componentes o formulário já envia e-mails

contact_form_success

contact_form_error

Analise de Fraudes Online (Phishing Scam)

Analise de Fraudes Online (Phishing Scam)

atualizado em 20/04/2015

O QUE É UMA FRAUDE ONLINE?

Breve explicação do que é um fraude online:

Comunicação digital que forja uma situação de confiança entre a vítima e o fraudador, de forma a induzir a vítima compartilhar informações pessoais e financeiras, a fim de concluir a fraude.

Recentemente, um amigo me abordou e relatou um caso que lhe havia acontecido e que lhe causara muita suspeita.Brigadier General Luciano Portolano

Ao concluir seu relato, imediatamente expliquei que ele havia sido vítima de uma tentativa de fraude online. Analisamos os e-mails e documentos enviados e garanti que nenhum dano havia sido causado, pois ele havia suspeitado e havia perguntado a mim antes de prosseguir com o engodo.

HERANÇA DE PARENTE DISTANTE OU DESCONHECIDO

A história é simples e muito comum: Um milionário qualquer, falecido em algum lugar remoto, não tem herdeiros, ou seu herdeiro (a) não é adulto e, portanto, incapaz de assumir as finanças da família. Seu atencioso advogado, então, descobre que a vítima é parente do falecido, ou que, por algum milagre desconhecido, é a única pessoa de confiança que pode assumir o “fardo” de gerenciar os milhões.

Desesperadamente, o advogado, ou “tutor”, insiste que passará todo o dinheiro para a conta da vítima, mas que essa precisa depositar uma quantia “simbólica” para processamento dos documentos e transferência de capital.

Apesar de haverem nuances entre as histórias, todas basicamente tem o mesmo roteiro. A vítima deposita o dinheiro (entre 500 e 2000 dólares americanos) e nunca mais recebe sequer um e-mail sobre o assunto.

A seguir, farei uma breve análise de alguns “documentos” fraudulentos enviados à vítima, a fim de facilitar a identificação. Também, posto alguns links para denúncia do crime.

Affidavit of Oath - Analise de Fraudes Online (Phishing Scam)

Note a qualidade do documento ao lado. Não tem a mínima aparência de documento escaneado ou produzido por gráfica. Perceba as cores vivas e como o selo de autenticidade e estampa de documento classificado foram inseridos como imagem.

Note, também as assinaturas, que parecem ser digitalizadas. Voltaremos a ver as mesmas assinaturas em breve.

Um documento dessa importancia nunca teria uma qualidade tão baixa. O documento parece que foi feito num editor de imagens simples, como paint (windows).

Death Certificate - Analise de Fraudes Online (Phishing Scam)Veja esse outro documento. Uma certidão de óbito. Parece ser um documento que seria emitido por qualquer hospital? Novamente, a impressão que dá é que foi feito no word (Microsoft office). Uma certidão de óbito, quando digitalizada, nunca teria esse layout.

O mais interessante da certidão é a causa da morte: “bermuda de tiros” (bullet SHORTS)

Nenhum hospital iria cometer erro tão crasso de ortografia definindo a causa de morte como bermuda de tiros.

Power of Attorney - Analise de Fraudes Online (Phishing Scam)

Este documento é a procuração, que dá poderes à vítima de se tornar “beneficiária” da herança do falecido. Note a assinatura e o nome relacionado com a assinatura. Reconhece? E não para por aí, o documento a seguir tem a mesma assinatura.

Será que uma única pessoa do Senegal é responsável por assinar tantos documentos oficiais?

Royal Bank of Scotland. Analise de Fraudes Online (Phishing Scam)

Esse último documento é o mais mal feito de todos. Consegue imaginar um banco, chamado “Banco Real da Escócia” fazendo um documento financeiro com essa cara?

Note que a assinatura é a mesma que a procuração. Então a pessoa do banco também passou a procuração?

São muitas coincidências de uma vez?

Quando o número coincidências é extremo e a situação parece boa demais para ser verdade, sinal de que realmente é boa demais para ser verdade. Não passa de uma fraude.

FUNDOS ‘HUMANITÁRIOS’

Também existem os emails com ‘fundos’ milionários, que devem ser distribuidos ou serão perdidos. Frequentemente, esses emails são bastante genéricos e tentam atrair atenção inicial, mas que são somente maneiras de conseguir seus dados (caso responda).

from: Brigadier General Luciano Portolano <generalportolan40@hotmail.com>
reply-to: generalportolan40@gmail.com
to:
date: Tue, Sep 24, 2013 at 8:01 AM
subject: Sua resposta urgente será necessária

Olá,

Saudações do Afeganistão e obrigado por suas orações!

Eu sou brigadeiro Luciano Portolano, com um comandante da Força Internacional de Assistência à Segurança (ISAF). Atualmente, no Afeganistão, Nós realmente apreciamos todas as suas preocupações e orações em relação a nós aqui. Há um desenvolvimento urgente aqui que exigem uma assistência urgente e desesperado que eu tinha para contatá-lo para a assistência, se você não mind.I tem o seu e-mail enquanto eu estava procurando através de livro de visitas do seu país.

Eu e alguns dos meus homens de plantão última sexta-feira descobriu uma certa quantidade de dinheiro que temos compartilhado entre nós ea minha parte do fundo é de R $ 15.8million que a Cruz Vermelha oficial que fazem viagens dentro e fora deste embargo prometeu mover-se em um caixa de remessa do fundo e entregar a você. Eu vejo isso como uma oportunidade que vai ajudar tanto de nós, portanto, a minha determinação em contato com você. Eu quero que você manter tudo secreto e confidencial, devido ao nível da minha personalidade e eu prometo que ambos irão se beneficiar deste no futuro, como você investir e administrar o fundo.

Podemos não ter tido qualquer contato pessoal, mas eu creio que Deus tem uma maneira de reunir as pessoas para alcançar seu propósito. Você pode ter um olhar do meu perfil para saber mais sobre mim. E deixe-me saber o mais cedo possível se está tudo bem com você para que possamos prosseguir.

Deus os abençoe.

Brigadier General Luciano Portolano
Afeganistão

LOTERIA

Também existem os emails que alegam que você ganhou milhões, algumas vezes de alguma loteria desconhecida num país distante e algumas até de agencias de investigação, como abaixo, alegando ser do FBI, informando que ganhei 2.4 milhões:

from: FBI OFFICE <fbifederal09@gmail.com>
reply-to: kenjackson1122@yahoo.es
to:
date: Wed, Oct 9, 2013 at 7:08 AM
subject: Federal Bureau of Investigation F B I

Anti-Terrorist And Monetary Crimes Division
FBI Headquarters, Washington, D.C.
Federal Bureau Of Investigation
J.Edgar Hoover Building
935 Pennsylvania Avenue, Nw Washington, D.C. 20535-0001
www.fbi.gov

ATTENTION: BENEFICIARY

This e-mail has been issued to you in order to Officially inform you that we have completed an investigation on an International Payment in which was issued to you by an International Lottery Company. With the help of our newly developed technology (International Monitoring Network System) we discovered that your e-mail address was automatically selected by an Online Balloting System, this has legally won you the sum of $2.4million USD from a Lottery Company outside the United States of America. During our investigation we discovered that your e-mail won the money from an Online Balloting System and we have authorized this winning to be paid to you via INTERNATIONAL CERTIFIED BANK DRAFT.

Normally, it will take up to 5 business days for an INTERNATIONAL CERTIFIED BANK DRAFT by your local bank. We have successfully notified this company on your behalf that funds are to be drawn from a registered bank within the world winded, so as to enable you cash the check instantly without any delay, henceforth the stated amount of $2.4million USD has been deposited with IMF.

We have completed this investigation and you are hereby approved to receive the winning prize as we have verified the entire transaction to be Safe and 100% risk free, due to the fact that the funds have been deposited with IMF you will be required to settle the following bills directly to the Lottery Agent in-charge of this transaction whom is located in Cotonou, Benin Republic. According to our discoveries, you were required to pay for the following,

(1) Deposit Fee’s ( IMF INTERNATIONAL CLEARANCE CERTIFICATE )
(3) Shipping Fee’s ( This is the charge for shipping the Cashier’s Check to your home address)

The total amount for everything is $96.00 We have tried our possible best to indicate that this $96.00 should be deducted from your winning prize but we found out that the funds have already been deposited IMF and cannot be accessed by anyone apart from you the winner, therefore you will be required to pay the required fee’s to the Agent in-charge of this transaction

In order to proceed with this transaction, you will be required to contact the agent in-charge ( Mr. Ken Jackson ) via e-mail. Kindly look below to find appropriate contact information:

CONTACT AGENT NAME: Mr. Ken Jackson
E-MAIL : kenjackson1122@yahoo.es
PHONE NUMBER: +229-6761-7633

You will be required to e-mail him with the following information:

FULL NAME:
ADDRESS:
CITY:
STATE:
ZIP CODE:
DIRECT CONTACT NUMBER:
OCCUPATION:

You will also be required to request Western Union or Money Gram details on how to send the required $96.00 in order to immediately ship your prize of $2.4million USD via INTERNATIONAL CERTIFIED BANK DRAFT from IMF, also include the following transaction code in order for him to immediately identify this transaction : EA2948-910.

This letter will serve as proof that the Federal Bureau Of Investigation is authorizing you to pay the required $96.00 ONLY to Mr. Ken Jackson via information in which he shall send to you,

Mr. Robert Mueller
Federal Bureau of Investigation F B I
Yours in Service,Photograph of Director
Robert S. Mueller, IIIRobert S. Mueller,
III Director Office of Public Affairs

—————————————————————-
This message was sent using IMP, the Internet Messaging Program.

EMPREGOS

Também existem engôdos (phishing scam) de emprego! Cada vez parecem mais criativos. Também é outra forma de conseguir seus dados, caso responda.

From: RAS GAS COMPANY (rasoilandgas@hotmail.com)
Sent:Saturday, January 10, 2015 8:12:37 AM
To:

Dear Friend,We are RASGAS COMPANY situated in LONDON UK, after seeing your profile on FACEBOOK.
we would like to discuss a job opportunity for you in our company RASGAS COMPANY, LONDON UK.
RASGAS COMPANY is one of the leading oil and gas company in Emirates .
Meanwhile the UK plant is newly built we are recruiting to fill in various positions.
If you are interested in any of the under listed vacant, kindly submit your CV and Qualifications to the following
Email: rasoilandgas@hotmail.com or rasandgasrecuitment@hotmail.com, You can Call Us on +447045735603 for further discussions.

PLEASE SEE JOB AVAILABLE POSITIONS FOR REFERENCE.

* TECHNICAL AND MATERIAL CONTROL. (REF:017)
* MATERIAL ENGINEERING (REF: 018)
* SAFETY/MAINTENANCE ENGINEERING (REF:0! 19)
* CHEMICAL ENGINEERING (REF: 020)
* WATER ENGINEERING (REF:021)
* WELDER (REF: 022)
* DRILLER /OFFSHORE AND ONSHORE ENGINEERS (REF:023)
* PROJECT MANAGEMENT(REF: 024)
* MACHINE OPERATORS(REF: 025)
* PIPELINE ENGINEER/PIPING DESIGNER (REF:026)
* PROCUREMENT MANAGER(REF:027)
* PERSONNEL MANAGEMENT(REF:028)
* ADMINISTRATION MANAGEMENT(REF:029)
* GEOPHYSICIST AND ASTROPHYSICIST(REF:030)
* PETROLEUM ENGINEERING(REF: 022)
* CIVIL ENGINEERING(REF: 022) (REF:031)
* COMPUTER ENGINEERING(REF:032)
* ARCHITECT ENGINEER(REF:033)
* BODY GUARDS/ BOUNCER.
* COMPUTER CONTROL UNITS.
* ASSISTANT RESTAURANT MANAGER.
* LAUNDRY SUPERVISOR.
* ACCOUNTS MANAGER.
* STAFF ENGINEER’S CONTROL UNITS.
* ASSISTANT FRONT OFFICE MANAGER.
* STOCKS SUPERVISOR.A
* STOCKS KEEPERS.
* FRONT OFFICE MANAGER.
* SALES ATTENDANTS.
* HUMAN RESOURCES MANAGER.
* CHIEF COMPUTER OPERATOR.
* SALES MANAGER.
* CLEANERS.
* HOUSEKEEPING SUPERVISOR.
* CAR HIRE ATTENDANTS.
* GARDNER.
* WAITERS/WAITRESS.
* SECURITY BOTH MALE AND FEMALE WITH ONE YEAR EXPERIENCE.
* SPECIAL ASSIGNED DRIVERS.
* LAUNDRY OPERATOR.
* ASSISTANT SUPERVISOR OF HOUSEKEEPING.
* HAIR DRESSERS.
* BARBER.
* BUTCHERS.
* BAKERS.
* COOK.
* TECHNICIAN.
* CASHIER.
* DOCTORS AND NURSE.
* MARINE ENGINEER(REF:034)
* MECHANICAL ENGINEER(REF:035)
* ELECTRICAL /ELECTRONICS ENGINEER(REF:036)
* TELECOMMUNICATION ENGINEERING(REF:037)
* ACCOUNTING, EXECUTIVE, ADMINISTRATOR ENGINEER(REF:038)
* AEROSPACE ENGINEER (REF:039)
* SURVEYORS ENGINEER (REF:040)
* OPERATION ENGINEERING(REF:041)
* EMERGENCY MEDICAL OFFICERS – DOCTORS/NURSES/DENTIST(REF:042)
* ACCOUNTANT/MANAGER/
* ADMINISTRATIVE POSITIONS (REF:043)
* TEACHERS
* CLEANERS

In just twenty years, RasGas has grown to be a world-class energy company delivering LNG and helium to customers all around the globe. We got here by employing the most skilled, dedicated and diverse group of people in our industry.
If you are looking for a place to work where you can contribute your energy, skills and experience, and where high performance is recognised and rewarded, then you should get in touch.
EMAIL: rasoilandgas@hotmail.com OR rasandgasrecuitment@hotmail.com
Our future looks bright. Join us to make yours bright too.

Best Regards,
Engr.Jim Jennings
RECRUITMENT MANAGER,
RASGAS COMPANY, LONDON U.K

Notem que nenhuma empresa a mais de 20 anos do mercado enviaria um email de recrutamento tão amador e com endereço de hotmail ainda por cima! Esse tipo de scam é possível reconhecer em 3 segundos!!!

CONFIRMAÇÃO DE CONTA

Claro, também existem os emails phishing de contas, como este, que alega que sua conta só pode ser mantida se você confirmar seus dados. Também existem emails parecidos para contas de banco, email, facebook, twitter e muitas outras. O interesse desses emails é deixar a pessoa assustada e agir por impulso, por medo de perder sua conta, etc. A pessoa responde com seus dados, mas simplesmente dá ao fraudador acesso a sua conta real.

 

From: info@mail.com Microsoft SmartScreen classified this message as junk.
Sent:Tuesday, December 15, 2015 7:56:09 AM
To:Recipients (info@mail.com)

Dear Customers

This mail is to inform all our valued customers that we are currently upgrading our Admin database, e-mail Center and expanding e-mail quota limit from 500 MB to 2.6 GB. You need to Upgrade and expand your e-mail quota limit to 2.6 GB before you can continue to use your e-mail.you are required to complete your details below and send it to us.This information would be required to verify and upgrade e-mail account to avoid being closed. Please clicking on the reply button;

Full Name:
User Name:
Email:
Password:

Your account will remain active after you have successfully confirmed your account to the monitoring Center.

Thanks for using our Email Services.
©2015 All Rights Reserved.

Nenhum serviço online jamais irá pedir que você confirme sua senha! Na dúvida, entre no site do serviço e entre em contato com o suporte (jamais clique em links nesses emails, que podem abrir páginas falsas).

Bloqueio de Conta

Uma das tentativas de phishing mais sutis e eficazes é o email de bloqueio de conta. Especialmente de contas que gerenciam dinheiro (Banco do Brasil, Santander, Itaú, PagSeguro, Paypal, Mercado Livre, etc).

Esses emails “informam” o usuário que existe algum tipo de suspeita em sua conta, e que a mesma será bloqueada se nada for feito. Como a maioria das pessoas entram em pânico quando seu dinheiro vai ser bloqueado, a maioria nem pensa duas vezes e clica nos links, caindo no embuste.

Nunca clique no link! Abra uma página com sua conta e verifique. Os links das “notificações” abrem páginas falsas, que foram feitas para registrarem seus dados (usuário e senha)

Analise de Fraudes Online (Phishing Scam)

Bancos e entidades financeiras NUNCA enviam emails com links, exatamente para não confundir seus clientes.

Impeachment Político

Hoje, dia 20 de Abril de 2016, recebi um email para participar de um “abaixo-assinado” para impeachment da presidente atual, Dilma Rousseff.

Analise de Fraudes Online (Phishing Scam)

Mas note, o link para baixar o pdf abre uma página desconhecida (endereço de IP). Phishing garantido.

Analise de Fraudes Online (Phishing Scam)

Os criminosos sempre surpreendem com sua criatividade!

Conclusão

Cuidado com fraudes online. Se receber alguma proposta ou pedido desesperado de ajuda,  vindo de um local extremamente remoto, pedindo que se deposite um valor simbólico para processamento da transferência, ou oferta de emprego, ou prêmio de loteria, ou aviso de herança de algum parente distante, suspeite na hora!

Referencias: