|
Данная страница является статическим представлением статьи, расположенной на сайте http://gsbelarus.com Динамический адрес страницы: ../modules.php?name=News&file=article&sid=68 Категория страницы: Статья; Тема: Гедымин Перейти к оглавлению. |
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
set Fields = iConf.Fields
Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.tut.by" ' имя SMTP сервера
Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 2525 ' порт сервера для отправки сообщений
Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' cdoSendUsingPort ' CdoSendUsing enum value = 2
Fields("http://schemas.microsoft.com/cdo/configuration/smtpaccountname") = "KLN"
Fields("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = """KLN"" "
Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'cdoBasic
Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "KLN"
Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
Fields.Update
' Using the CDO instance
With iMsg
.Configuration = iConf
' Set who the email is going to
.To = "KLN@TUT.BY"
' Set the subject
.Subject = "Test"
' Set the Text of the message - I could have used the HTMLBody
property to send
' HTML e-mail
.TextBody = "THIS is the test!"
' Send the mail
.AddAttachment "C:ORDER.XLS"
.Send
On Error Resume Next
End With
set iMsg = Nothing
set iConf = Nothing
|
Данная страница является статическим представлением статьи, расположенной на сайте http://gsbelarus.com Динамический адрес страницы: ../modules.php?name=News&file=article&sid=68 Категория страницы: Статья; Тема: Гедымин Перейти к оглавлению. |