Skip to content

Instantly share code, notes, and snippets.

@zaki-yama
Last active August 29, 2015 14:13
Show Gist options
  • Save zaki-yama/263bfbccb477790cb3f6 to your computer and use it in GitHub Desktop.
Save zaki-yama/263bfbccb477790cb3f6 to your computer and use it in GitHub Desktop.
[Salesforce] 今日あと何通Apexでメール送信できるのか?を取得
Integer count = 0;
while (true) {
try {
Messaging.reserveSingleEmailCapacity(1);
count++;
} catch (Exception e) {
System.debug(LoggingLevel.INFO, 'メール送信可能回数はあと ' + count + ' 回');
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment