Matching email addresses in Javascript
Matching email addresses in Javascript regex = /\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b/img "hello sean@example.com how are you? do you know bob@example.com?".match(regex) // => ["sean@example.com", "bob@example.com"]
Written by Sean Behan on 03/24/2017
How to send email with Python, smtplib and Postmark
Here is a quick code snippet showing how to send email via SMTP with Postmark without any dependencies. It assumes you are using Heroku and have added the addon. But if not just make sure your api keys are set as environment vars. from os import envir...
Written by Sean Behan on 03/12/2017
Email Regex
Regular Expression that Matches Email Addresses: /\b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b/
Written by Sean Behan on 06/17/2012
Carrier Email Addresses for Sending SMS over Email
Just for reference, here are the carrier email addresses for sending email as an SMS. Look up the carrier for the phone in question, then send an email in this format [telephonenumber]@[carrier-name.com] Carrier Email to SMS Gateway Alltel [10-digit p...
Written by Sean Behan on 06/17/2012
Using the PHP Mail Function with Additional Headers
Pass a fourth parameter to the mail() function with the header information. <?php $to = "jane@example.com"; $subject = "Hello World!"; $body = "This will be sent from email-addr@example.com"; $headers = "From: email-addr@example.com\r\nX-Mailer: php";...
Written by Sean Behan on 06/17/2012
Send Mail in Ruby with a Pony
Great little gem that let's you quickly and easily send out mail from your ruby scripts. gem install pony require 'rubygems' require 'pony' Pony.mail :from=>"me@example.com", :to=>"you@example.com", :subject=>"hello", :body=>"world"
Written by Sean Behan on 06/17/2012
Using sendmail to send mail on ubuntu box
I normally install postfix for my MTA. However, I've never really used sendmail so I'd decide to give it a whirl for a new application I'm working on. I don't use it for anything but handling the mail that the application needs to send out, like new user ...
Written by Sean Behan on 06/17/2012
Email Obfuscation and Extraction from Text with Rails
There is a helper method for handling the obfuscation of email addresses in Rails. mail_to "me@domain.com", "My email", :encode => "hex" # => My email If you want to then extract an email address(or all email addresses) from a block of text here is the...
Written by Sean Behan on 06/17/2012
Postfix, ActionMailer and OpenSSL Fix on Ubuntu
If you run into problems using ActionMailer > 2.2, Postfix and OpenSSL while sending mail from your application, try changing the following: vim /etc/postfix/main.cf Change smtpd_use_tls=yes to smtpd_use_tls=no OpenSSL support with Postfix does ...
Written by Sean Behan on 06/17/2012
Sending eMail with Rails on Mac OS X Development Environment
You'll need a mail transport agent (MTA). I installed and used postfix using Mac Ports. sudo port install postfix You'll need to start postfix, to send mail from your Rails application. You can set it as a startup item and it will start on boot. However...
Written by Sean Behan on 06/17/2012