Author |
|
emadeva Newbie
Joined: 14 June 2012 Location: United States
Online Status: Offline Posts: 1
|
Posted: 14 June 2012 at 5:27am | IP Logged
|
|
|
Using this code I get the "Smtp is ambiguous in the namespace 'Mailbee.SmtpMail" error on the Dim statement:
Code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim objSMTP As New Smtp
objSMTP = CreateObject("MailBee.SMTP")
' Enable logging SMTP session into a file
objSMTP.EnableLogging = True
objSMTP.LogFilePath = "C:\emad.txt"
objSMTP.ClearLog()
objSMTP.LicenseKey = "myrealkeyishidden"
' Set SMTP server name
objSMTP.ServerName = "mail.bluebottle.com"
' Enable SMTP authentication
objSMTP.AuthMethod = 2
' Set authentication credentials
objSMTP.UserName = "myusernameishidden"
objSMTP.Password = "mypasswordishidden"
' Set message properties
objSMTP.FromAddr = "myemail@bluebottle.com"
objSMTP.ToAddr = "emailgoingout@gmail.com"
objSMTP.Subject = "Test"
objSMTP.BodyText = "Body of the test message"
' Try to send message
If objSMTP.Send Then
MsgBox("Sent successfully")
Else
MsgBox("Error #" & objSMTP.ErrCode & ", " & objSMTP.ErrDesc)
End If
End Sub
|
|
|
This code is based on your sample code from the web site.
Can you tell me what I'm missing?
Thanks.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 14 June 2012 at 5:42am | IP Logged
|
|
|
Are you actually using VBScript or Visual Basic? In the former case, it should be:
instead of:
as this one would work for Visual Basic only, not for VBScript.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 14 June 2012 at 6:21am | IP Logged
|
|
|
And if you might be using VB.NET, MailBee.NET Objects is a better choice in that case.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|