This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'class.phpmailer.php'; | |
$mail = new PHPMailer(); | |
$mail->IsSMTP(); | |
$mail->IsHTML(true); | |
$mail->Host = 'smtp1.example.com'; | |
$mail->SMTPAuth = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// multiple recipients | |
$to = 'aidan@example.com' . ', '; // note the comma | |
$to .= 'wez@example.com'; | |
// subject | |
$subject = 'Birthday Reminders for August'; | |
// message | |
$message = ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<b>Name:</b> <# payload.FirstName " " payload.LastName #><br> | |
<b>Date of Birth:</b> <# payload.DateOfBirth #><br> | |
<# if (payload.Id != null) { #> | |
<a href="http://company.com/sign-up">Sign Up Free!</a> | |
<# } else { #> | |
<a href="http://company.com/login?username=<# urlencode(payload.UserName) #>">Sign In</a> | |
<# } #> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Comfirm.AlphaMail.Services.Client; | |
using Comfirm.AlphaMail.Services.Client.Entities; | |
namespace Comfirm.Examples.AlphaMail | |
{ | |
class Person | |
{ | |
public int Id { get; set; } | |
public string UserName { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net; | |
using System.Net.Mail; | |
namespace Comfirm.Examples.Native | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getApproximateElapsedTime(date) { | |
var timeDelta = new Date().getTime() - date.getTime(); // ms | |
var map = [ | |
{ unit: 1000, singular: "%d second", plural: "%d seconds" }, | |
{ unit: 60, singular: "%d minute", plural: "%d minutes" }, | |
{ unit: 60, singular: "%d hour", plural: "%d hours" }, | |
{ unit: 24, singular: "%d day", plural: "%d days" }, | |
{ unit: 29.53, singular: "%d month", plural: "%d months" }, // Avg. days per month | |
{ unit: 12, singular: "%d year", plural: ">%d years" } |
NewerOlder