public class ERWOMailDelivery extends Object
ERWOMailDelivery operates just the same as WOMailDelivery, and has all of the same limitations and weird API. However, instead of using the Sun's broken* and unsupported sun.net.smtp.SmtpClient, it uses JavaMail.
*sun.net.smtp.SmtpClient doesn't put addresses in angle brackets when sending the SMTP MAIL FROM command. Many SMTP servers won't work with it.
ERWOMailDelivery は WOMailDelivery と同じように動作します。全く同じ制限と不思議な API を持っています。 正しい、Sun 社の壊れているサポートしない sun.net.smtp.SmtpClient と違って JavaMail を使用しています。
*sun.net.smtp.SmtpClient は SMTP MAIL FROM で送信するアドレスを括弧で囲まないので、大抵の SMTP サーバは動作しないのです。
Modifier | Constructor and Description |
---|---|
protected |
ERWOMailDelivery()
Default constructor (don't use).
|
Modifier and Type | Method and Description |
---|---|
String |
composeComponentEmail(String fromEmailAddress,
NSArray<String> toEmailAddresses,
NSArray<String> bccEmailAddresses,
String subject,
com.webobjects.appserver.WOComponent component,
boolean sendNow)
Creates and optionally sends a WOComponent as email.
|
String |
composePlainTextEmail(String fromEmailAddress,
NSArray<String> toEmailAddresses,
NSArray<String> bccEmailAddresses,
String subject,
String message,
boolean sendNow)
Creates and optionally sends a plain text email.
|
void |
sendEmail(String mailString)
Sends the RFC822 mail string created with either
composePlainTextEmail(String,NSArray,NSArray,String,String,boolean) or
composeComponentEmail(String,NSArray,NSArray,String,WOComponent,boolean) . |
static ERWOMailDelivery |
sharedInstance()
|
String |
toString() |
protected ERWOMailDelivery()
sharedInstance()
instead. sharedInstance()
を使用します。 public static ERWOMailDelivery sharedInstance()
public String composePlainTextEmail(String fromEmailAddress, NSArray<String> toEmailAddresses, NSArray<String> bccEmailAddresses, String subject, String message, boolean sendNow)
fromEmailAddress
- Originating email address. Required.toEmailAddresses
- Destination email address. Required.bccEmailAddresses
- Array of Strings containing additional addressed to BCC. Can be null.subject
- Subject the message. Can be null.message
- Body the the message. Required.sendNow
- Whether to send the message right away. If you're going to send the message right away, it's faster to
set sendNow to true than set it to false and calling sendEmail(String)
later.
fromEmailAddress
- - 送信元メール・アドレス(必須)toEmailAddresses
- - 送信先メール・アドレス NSArray(必須)bccEmailAddresses
- - BCC メール・アドレス NSArray (Null可)subject
- - メール・サブジェクト(Null可)message
- - メッセージ(必須)sendNow
- - true ですぐに送信します。
すぐに送信時には false を設定し後で sendEmail(String)
で送信するよりも true の方が早い
public String composeComponentEmail(String fromEmailAddress, NSArray<String> toEmailAddresses, NSArray<String> bccEmailAddresses, String subject, com.webobjects.appserver.WOComponent component, boolean sendNow)
fromEmailAddress
- Originating email address. Required.toEmailAddresses
- Destination email address. Required.bccEmailAddresses
- Array of Strings containing additional addressed to BCC. Null OK.subject
- Subject the the message. Null OK.component
- Body the the message. Required.sendNow
- Whether to send the message right away. If you're going to send the message right away, it's faster to
set sendNow to true than set it to false and calling sendEmail(String)
later.
fromEmailAddress
- - 送信元メール・アドレス(必須)toEmailAddresses
- - 送信先メール・アドレス NSArray(必須)bccEmailAddresses
- - BCC メール・アドレス NSArray (Null可)subject
- - メール・サブジェクト(Null可)component
- - コンポーネント(必須)sendNow
- - true ですぐに送信します。
すぐに送信時には false を設定し後で sendEmail(String)
で送信するよりも true の方が早い
public void sendEmail(String mailString)
composePlainTextEmail(String,NSArray,NSArray,String,String,boolean)
or
composeComponentEmail(String,NSArray,NSArray,String,WOComponent,boolean)
. It's faster to call either
method with the sendNow parameter set to true than to use this method.
Copyright © 2002 – 2020 Project Wonder.