| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 73 人关注过本帖
标题:MailKit For VFP9 V1.0
取消只看楼主 加入收藏
iswith
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:5
帖 子:524
专家分:699
注 册:2013-5-14
结帖率:2.6%
收藏
 问题点数:20 回复次数:0 
MailKit For VFP9 V1.0
* MailKit For VFP9 V1.0

* Common SMTP Server Configuration
* Service provider    SMTP server                Port        Encryption Method
* Gmail                smtp.            587            StartTls
* Outlook            smtp.        587            StartTls
* QQ                smtp.                465            SslOnConnect
* 126                stmp.            25          StartTls

* SecureSocketOptions
* None = 0                         No SSL or TLS encryption should be used.
* Auto = 1                         Allow the MailKit.IMailService to decide which SSL or TLS options to use (default).;
                                   If the server does not support SSL or TLS, then the connection will continue;
                                   without any encryption.

* SslOnConnect = 2                 The connection should use SSL or TLS encryption immediately.
* StartTls = 3                     Elevates the connection to use TLS encryption immediately after reading the greeting;
                                and capabilities of the server. If the server does not support the STARTTLS extension,;
                                then the connection will fail and a System.NotSupportedException will be thrown.

* StartTlsWhenAvailable = 4     Elevates the connection to use TLS encryption immediately after reading the greeting;
                                and capabilities of the server, but only if the server supports the STARTTLS;
                                extension.
                                
* SMTP Asynchronous Email Sending Method
*SendEmailAsync(  string FromEmail ;
               , string ToEmail    ;   
               , string Subject    ;   
               , string HtmlBody   ;   
               , string TextBody   ;
               , SecureSocketOptions socketOptions ;
               , string Attachments = "" )
               
* Events
* OnSendEmail( bool Success , string Message )


* Synchronize Sending Emails
* Bool SendEmail(string FromEmail ;
               , string ToEmail    ;   
               , string Subject    ;   
               , string HtmlBody   ;   
               , string TextBody   ;
               , SecureSocketOptions socketOptions ;
               , string Attachments = "" ;
               , string @ErrorMsg)


* STMP Considerations
* Port and encryption method: Common combinations include 587 + StartTLS or 465 + SSL/TLS.
* Authentication failed: Some email services (such as Gmail) require the activation of "Application-specific password" or "Low-security application access".
* Attachment path: Ensure that the file exists and you have read permissions.
* If attachments are large, use asynchronous sending to avoid blocking current business operations. After the command is sent,;
  the system enters an asynchronous processing state. Once the sending is completed, the event OnSendEmail will be triggered for notification, ;
  where Success = true indicates that your send command was successfully processed.


图片附件: 游客没有浏览图片的权限,请 登录注册


[此贴子已经被作者于2025-2-23 00:09编辑过]

搜索更多相关主题的帖子: the SMTP TLS Server string 
昨天 15:50
快速回复:MailKit For VFP9 V1.0
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015116 second(s), 10 queries.
Copyright©2004-2025, BC-CN.NET, All Rights Reserved