Search The ForumSearch   RegisterRegister  LoginLogin

MailBee SMTP

 AfterLogic Forum : MailBee SMTP
Subject Topic: Smtp is ambiguous in the namespace ’Mailb Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
emadeva
Newbie
Newbie


Joined: 14 June 2012
Location: United States
Online Status: Offline
Posts: 1
Posted: 14 June 2012 at 5:27am | IP Logged Quote emadeva

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 View emadeva's Profile Search for other posts by emadeva
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5870
Posted: 14 June 2012 at 5:42am | IP Logged Quote Igor

Are you actually using VBScript or Visual Basic? In the former case, it should be:

Code:
Dim objSMTP


instead of:

Code:
Dim objSMTP As New Smtp


as this one would work for Visual Basic only, not for VBScript.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5870
Posted: 14 June 2012 at 6:21am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide