WebMailクラス Usernameプロパティ
メールのユーザー名を設定または取得します。
使用法
Dim instance As WebMail
Dim value As String
Dim returnValue As String
instance.Username = value
returnValue = instance.Username
使用例
'WebMailクラス Usernameプロパティ
Imports System.Windows.Forms
Public Class AddIn
Private Const CRLF = Microsoft.VisualBasic.ControlChars.CrLf
Public Sub AddIn_Start()
Dim wm As WebMail = New WebMail()
wm.Host = "smtp.sample.jp"
wm.Username = "sampleuser"
wm.Password = "passxxx"
wm.MailFrom = "info@sample.jp"
wm.MailTo = "info@tosample.jp"
wm.Subject = "テストメールです"
wm.Body = "テスト商事 御中" & CRLF _
& "西都路地 様" & CRLF _
& CRLF _
& "テストメールの送信です" & CRLF
If wm.Send() = True Then
MessageBox.Show("メール送信成功しました")
Else
MessageBox.Show("メール送信失敗しました")
End If
End Sub
End Class