Skip to content

Email from JustOn

The usual way to distribute finalized invoices, dunning reminders or account statements is email. To this end, JustOn Billing & Invoice Management relies on the email service provided by the Salesforce Platform.

This article summarizes important aspects and possible questions that may arise in this context.

E-Mail Status

email
Sending emails from JustOn

JustOn stores the email distribution status in the field Email Status on the invoice or statement. There are the following statuses:

Email Status Description
Unsent The default status: the email has not been sent yet.
Queued The email is put in the queue for being sent by the corresponding job. Is set after the user has clicked Send.
Sent The email has been successfully sent by the email job.
Error The email has not been sent because of an error. The error message is written to the field Email Error.
The email job tries to resend the invoice email on its next run.

E-Mail Job

Unless triggered manually, emails are not sent immediately on invoice or statement finalization. Instead, JustOn queues the emails and sends them at 03:00 every day by default. To this end, it provides the Apex class EmailJobChain, which is set up accordingly as a scheduled job.

Your business may, however, require another email interval. In this case, you change the email job schedule:

  1. Open the Scheduled Jobs page.

    Use the following URL https://login.salesforce.com/apex/ONB2__JobsSetup, or, if you are already logged in, append apex/ONB2__JobsSetup to your org's domain name.

    As of JustOn 2.52, you can access the Scheduled Jobs page via the JustOn configuration app (App Launcher > JustOn Configuration > Jobs Setup).

  2. From the Apex Job picklist, select Email Job.

    The Job Name field is automatically set to EmailJobChain.

    alt text
    Scheduling email job

  3. From the Start Time picklist, select the preferred execution time.

  4. Optionally, edit the displayed cron expression to adjust the execution time.
  5. Click Schedule.

    This sets up the email distribution to be executed at the specified time.

Info

Clicking Run immediately you can execute the batch chain instantly.

Email Tracking

To help tracking the invoice distribution, JustOn creates a history task for sent invoice emails. The generated task records are displayed in the Activities list on the related invoice.

Note

Due to security-related modifications introduced with JustOn 2.74, you must explicitly allow Read and Edit access to the Type field of the Task object, as described in Enabling Access for New Users.

invoice_history_task
Displaying tasks on invoices

Info

Note that record types for Task records are always project specific. Therefore, JustOn cannot programmatically support your record types. For details about working with record types, see Tailor Business Processes to Different Users in the Salesforce Help.

For details, see Controlling Email Tracking Options.

Email Limit

On the Salesforce platform, you can send mass email (using the API or Apex) to a maximum of 5000 external email addresses per day per org. Under certain conditions, Salesforce Support may temporarily raise your org's mass email limit. For details, see Mass Email Limitations in the Salesforce Help.

Depending on your business, your org may permanently need to send more emails per day. To support this, JustOn can integrate with the Amazon Simple Email Service (SES) to send out invoices, dunning reminders and account statements.

Info

The Amazon SES integration is an enterprise extension feature and subject to additional charges. For details, contact our service team.

For details about enabling the Amazon SES integration, see Enabling Amazon Simple Email Service.

Email Security Compliance

Salesforce uses the Sender Policy Framework (SPF), an email authentication method designed to detect forged sender addresses, aiming at reducing spam and fraud. Email providers use SPF to verify the authenticity of email senders based on the sender address of the email envelope (which is different from the email header's From: address displayed to users).

Enabling email security compliance sets the envelope sender address to bnc.salesforce.com. This is an authorized domain, so emails sent from Salesforce will pass SPF checks. The header From: address remains set to the configured sender's email address. For details, see Sender Policy Framework (SPF) in the Salesforce Help.

Some recipients may use the (less common) Sender ID email authentication protocol. As an option, Salesforce can, additionally, enable Sender ID compliance. Doing so sets the envelope sender address to noreply@salesforce.com. Consequently, a number of email clients append a phrase like Sent on behalf of to the header's From: field if the sending domain (in the envelope) differs from the domain of the configured sender's email address. Users then may see, for example noreply@salesforce.com on behalf of .... For detals on removing noreply@salesforce.com or Sent on behalf of from outgoing email, see How to remove noreply@salesforce.com from sender address?.

Info

Emails sent from Salesforce may be considered non-personal bulk email, and therefore get caught in spam filters. To prevent this from happening, you can use Salesforce's email relay functionality, which routes outgoing emails through your company's mail server using your real email address.

Related information:

Send Email from Salesforce in the Salesforce Help
Checking Email Deliverability
Preventing Emails Being Filtered as Spam
PDF and Email FAQ