vbsendmail server comes up with strange server character

Posted on 2006-04-06
Last Modified: 2010-05-01
I've got vbsend mail working on one development server. I have a second sever I'm testing on too. I install vbsend mail and it complies fine and everything looks fine. No e-mail gets sent though. I set a breakpoint in VB and look at the settings and for smtpserver it shows may server name but there is a box character after the name. Kind of like there was a space or an extra character. I check the one it works on an it's just the server name. It's the exact same code and everything. Any ideas? I've tried passing the server name by hard coding it, text box, setting a variable. For some reason it won't let me give it the server name iwth out causeing issues.
Question by:t1clausen
    LVL 28

    Accepted Solution

    Have you tried :

    ServerName = "MyServer"
    ServerName = Left$(ServerName,Instr(ServerName,Chr(0)) -1)

    or Maybe:

    ServerName = "MyServer"
    ServerName = Left$(ServerName,Len(ServerName) -1)
    LVL 2

    Author Comment

    That's the thing there isn't an extra character there when I look at the variable

    I have
    Dim emailserver As String
    Set rSendMail = New vbSendMail.clsSendMail
    emailserver = "mailserver"
    rSendMail.SMTPHost = emailserver  When I mouse over is see {mailserver# = mailserver} where the # is the square I'm talking about.
    LVL 2

    Author Comment

    I fixed that by using rSendMail.SMTPHostValidation = VALIDATE_NONE but I'm not getting any e-mails still. I'm so stumpped. Could I be missing a reference or something?
    LVL 2

    Author Comment

    Ok I loaded up the sample script that came with the dll and I get this now

    Connection is aborted due to timeout or other failure

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction In a recent article ( for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now