Is there an api that I can use to generate an email to a given email address?


#1

Thinking of use cases in both Analytics and UserAdmin contexts to notify users when their access has changed in the environment for groups that don’t use Okta.


#2

Please see the type Email


#3

Thanks Riley, I checked that out earlier. To me, the Email Type looks like a Persistable Type that stores emails on the Platform for analysis, maybe for a CRM application or other use cases. I did not see a ‘send()’ method or any other similar method that would suggest that I can send an outgoing message. Where’s the ‘send’ button, so-to-speak?


#4

There is a C3 type, Mail, that allows you to send emails from code; however, its use is discouraged. The current implementation relies on AWS SES services which must be properly configured in order to send email. Additionally, if too many email messages are sent to invalid email addresses, AWS will flag C3 as a spammer and revoke the ability to send mail.

It will depend on your specific needs, but most likely I would recommend you look at the capabilities of the marketo package for sending and tracking email.


How to send Emails
#5

Update on this topic:

In order to use the Mail Type to send Emails, the following documentation should be consulted for set-up:
<>/api/1/YOUR_TENANT/YOUR_TAG/documentation/topic/aws-email

Here’s a script to test the sending of emails from the platform. Note that if you are in sandbox mode (see above documentation article for more on sandbox mode), the below script will not work without registering the sender and receiver addresses in AWS SES, a task currently controlled by either C3 Operations or your organization’s operations/security team:

var body = "This is a test email. Please do not respond to this email.\n\n"; 
var subject = 'Test for Email API'; 

var mail = Mail.make({ 
  from : "your_orgs_FROM_email_address", 
  to : receivers, 
  content_type : "text/html", 
  subject : subject, 
  content : body 
}).merge(); 


Mail.send(mail); ```

#6

If you are using an SES from another AWS account, this is how to configure Email with credentials