Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created March 7, 2011 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmertic/858555 to your computer and use it in GitHub Desktop.
Save jmertic/858555 to your computer and use it in GitHub Desktop.
<?php
$sea = new SugarEmailAddress;
// Add a primary email address
$sea->addAddress($primaryemailaddress, true);
// Add an invalid email address
$sea->addAddress($primaryemailaddress, false, null, true);
// Add an email address that should be marked opt-out
$sea->addAddress($primaryemailaddress, false, null, false, true);
// Associate the email address with the given module and record
$sea->save($record_id, "module_name");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment