CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of mail
'must have a legitimate email setup with smtp relays set greater than 0 in your godaddy control panel (email accounts) 
Private Sub btnSendMessage_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btnSendMessage.Click
      CreateTimeoutTestMessage("smtpout.secureserver.net") 'This is standard with most email relays at godaddy
  End Sub
  Public Shared Sub CreateTimeoutTestMessage(server As String)
      Dim [to] As String = "busted@fbi.gov"
      Dim from As String = "billyjoebob@hillbilly.com"
      Dim subject As String = "Catch Me If You Can."
      Dim body As String = "This is the body of the message. Yada Yada Yada"
      Dim message As New MailMessage(from, [to], subject, body)
by DaveCS   April 10, 2012 @ 6:53pm
39 Views
no comments
 
<asp:RegularExpressionValidator ValidationGroup="Anagrafica" ID="RegularExpressionValidatorEmail"
                                                    ControlToValidate="TextBoxEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                    ErrorMessage="Indirizzo email immesso non valido" EnableClientScript="true" runat="server" />
by Davide Orazio Montersino   March 05, 2012 @ 1:00am
26 Views
no comments
 
C#
/// <summary>
/// Creates the mail message.
/// </summary>
/// <param name="emailBody">The email body.</param>
/// <param name="maTo">The ma to.</param>
/// <param name="maFrom">The ma from.</param>
/// <param name="maBcc">The ma BCC.</param>
/// <param name="attachment">The attachment.</param>
/// <returns></returns>
public static MailMessage CreateMailMessage(string emailBody, string maTo, string maFrom, string maBcc, Attachment attachment)
by Prithvi Ramana A   December 22, 2011 @ 2:51am
49 Views
1 comments
 
FUNCTION ShowEmail( lcRecipient,lcSubject,lcBody )
RETURN GoUrl("mailto:" + lcRecipient + ;
             "&Subject=" + STRTRAN(UrlEncode(lcSubject),"+"," ") +;
             "&Body=" + STRTRAN(UrlEncode(lcBody),"+"," "))
 
****************************************************
FUNCTION GoUrl
******************
***    Author: Rick Strahl
***            (c) West Wind Technologies, 1996
by Rick Strahl   September 23, 2011 @ 12:38am
Tags: Email, Outlook
105 Views
no comments
 
C#
/// <summary>
/// Validates the email.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="System.Web.UI.WebControls.ServerValidateEventArgs"/> instance containing the event data.</param>
/// <param name="page">The calling <see cref="System.Web.UI.Page" /> web page.</param>
public void ValidateEmail(object sender, ServerValidateEventArgs e, Page page)
{
    var emailAddress = page.FindControl("emailAddress") as TextBox;
    var firstName = page.FindControl("firstName") as TextBox;
by Dean Weber   September 12, 2011 @ 7:19am
63 Views
no comments
 
function checkEmail(inputvalue){    
    var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/;
    if(pattern.test(inputvalue)){         
        return true;   
    }else{   
        return false; 
    }
}
by jaredmroberts   January 28, 2011 @ 2:52pm
201 Views
no comments
 
<?php
function sendMail($to, $subject, $body){
  global $sys;
  $fromMail = $sys->layout->optionGet('siteMailer', 'info@'.$sys->domain['domain'] );
  $mime_boundary = "MAILING".md5(time());
  $headers  = "From: $fromMail\nReply-To: $fromMail\n";
  $headers .= "MIME-Version: 1.0\n";
  
  $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";
by erkin   January 07, 2011 @ 4:41am
Tags: mail send
119 Views
no comments
 
<?php include("menu.php"); ?>
by jkr03513   October 28, 2010 @ 8:32pm
185 Views
no comments
 
C#
using (Imap client = new Imap())
{
    client.Connect(_server);
    client.Login(_user, _password);
    client.SelectInbox();
 
    client.GetAll()
        .ConvertAll(uid => client.GetHeadersByUID(uid))
        .ConvertAll(eml => new MailBuilder().CreateFromEml(eml).Subject)
        .ForEach(Console.WriteLine);
by lesnikowski   March 30, 2010 @ 12:46pm
Tags: Mail.dll
177 Views
no comments
 
param (
    $fileToImport = $(throw "must have a file to import!")
)
$from = "myemail@domain.com"
$smtpServer = "smtp.server"
$logoName = "d:\path_to_embedded_File\logo.jpg"
 
 
#Import-Csv $fileToImport | 
#    select to, htmlContent, AttachmentFileName | 
by David R. Longnecker   August 21, 2009 @ 10:00pm
792 Views
no comments
 
XML
<configuration>
    <system.net>
        <mailSettings>
            <smtp deliveryMethod="SpecifiedPickupDirectory">
                <specifiedPickupDirectory pickupDirectoryLocation="c:\email" />
            </smtp>
        </mailSettings>
    </system.net>
</configuration>
by Barry King   July 22, 2009 @ 1:12am
255 Views
no comments
 
C#
public static bool SendMail(string gMailAccount, string password, string to, string subject, string message, string attachments)
    {
        try
        {
            NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
            MailMessage msg = new MailMessage();
            msg.From = new MailAddress(gMailAccount);
            msg.To.Add(new MailAddress(to));
            msg.Subject = subject;
            msg.Body = message;
by Claudia Hidalgo   July 21, 2009 @ 9:34pm
Tags: csharp, mail
273 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate