-
首页
-
C4D R23.110 C++ SDK
SmtpMailInterface Class Reference
IO
#include <network_smtpmail.h>
详细描述
Send mail via smtp.
公共成员函数
|
MAXON_METHOD
Result
< void >
|
AttachText
(const
String
&text)
|
MAXON_METHOD
Result
< void >
|
AttachBin
(const
Url
&fname,
MEDIA
media=
MEDIA::UNKNOWN
,
MEDIASUB
sub=
MEDIASUB::UNKNOWN
)
|
MAXON_METHOD
Result
< void >
|
AttachBin
(const
String
&fileName, const
Block
< const
Char
> &data,
MEDIA
media=
MEDIA::UNKNOWN
,
MEDIASUB
sub=
MEDIASUB::UNKNOWN
)
|
MAXON_METHOD
Result
< void >
|
SetSender
(const
String
&sender, const
String
&senderClearName)
|
MAXON_METHOD
Result
< void >
|
GetSender
(
String
&sender,
String
&senderClearName) const
|
MAXON_METHOD
Result
< void >
|
SetReceiver
(const
Block
< const
SmtpReceiver
> &receiver)
|
MAXON_METHOD
Result
< void >
|
GetReceiver
(
WritableArrayInterface
<
SmtpReceiver
> &receiver) const
|
MAXON_METHOD
Result
< void >
|
SetSubject
(const
String
&subject)
|
MAXON_METHOD
Result
< void >
|
GetSubject
(
String
&subject) const
|
MAXON_METHOD
Result
< void >
|
SetUserPassword
(const
String
&user, const
String
&passwd)
|
MAXON_METHOD
Result
< void >
|
GetUserPassword
(
String
&user,
String
&passwd) const
|
MAXON_METHOD
Result
< void >
|
SendMimeMail
(const
String
&hostName,
Int
port)
|
成员函数文档编制
◆
MAXON_INTERFACE_NONVIRTUAL()
◆
Alloc()
function to allocate new instances of this object. use SmtpMailRef mail(MAXON_SOURCE_LOCATION); to allocate new object. SmtpMailRef is freed automatically.
◆
AttachText()
Set the text body of the mail.
-
参数
-
[in]
|
text
|
The text of the mail body.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
AttachBin()
[1/2]
Attach an binary file.
-
参数
-
[in]
|
fname
|
The
Url
of the attachment. Set the right mode so that the mail gets the right type.
|
[in]
|
media
|
See MEDIA.
|
[in]
|
sub
|
See MEDIASUB.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
AttachBin()
[2/2]
Attach an binary file.
-
参数
-
[in]
|
fileName
|
File name of the attachment.
|
[in]
|
data
|
Binary data to attach.
|
[in]
|
media
|
See MEDIA.
|
[in]
|
sub
|
See MEDIASUB.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
SetSender()
Set the sender email address and name.
-
参数
-
[in]
|
sender
|
Email address of the sender.
|
[in]
|
senderClearName
|
Real name of the sender.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
GetSender()
Get the sender email address and name.
-
参数
-
[out]
|
sender
|
Retrieves the email address of the sender.
|
[out]
|
senderClearName
|
Retrieves the real name of the sender.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
SetReceiver()
Set the receiver email address and name.
-
参数
-
[in]
|
receiver
|
Email addresses of the receivers.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
GetReceiver()
Get the receiver email address and name.
-
参数
-
[out]
|
receiver
|
Retrieves the email address of the receiver.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
SetSubject()
Set the subject of the mail.
-
参数
-
[in]
|
subject
|
Mail subject.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
GetSubject()
Get the subject of the mail.
-
参数
-
[out]
|
subject
|
Retrieves the email subject.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
SetUserPassword()
Sets the login user name and password for the smtp server.
-
参数
-
[in]
|
user
|
Username to logon at the smtp server.
|
[in]
|
passwd
|
Password to logon at the smtp server.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
GetUserPassword()
Gets the login user name and password for the smtp server.
-
参数
-
[out]
|
user
|
Retrieves username to logon at the smtp server.
|
[out]
|
passwd
|
Retrieves to logon at the smtp server.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.
◆
SendMimeMail()
Start the process of sending the mail.
-
参数
-
[in]
|
hostName
|
Smtp server address or name.
|
[in]
|
port
|
Smtp server port.
|
-
返回
-
IsOk() if the function succeded. HasError() if failed.