login about faq

Hi, I am trying to perform mxlookup using mailman. Here goes the code:

    Dim mailman As New Chilkat.MailMan()
    mailman.UnlockComponent("My Code")
    Dim mailServerHostname As String
    mailServerHostname = mailman.MxLookupAll("yahoo.ca").GetString(1)
    if mailserverhostname is nothing then mailserverhostname="failed."
    TextBox1.Text = mailServerHostname

The code is working fine for yahoo.com or gmail.com but not working for yahoo.ca

How can i resolve this? Is it a bug?


asked Nov 27 '12 at 17:42

Shaoun1000's gravatar image


MxLookupAll returns a Chilkat.StringArray object. Just because the word "Array" is in the name of a class does not mean it's an array. A Chilkat.StringArray is an object that contains a collection of strings which may be accessed via an index, not as an array, but via the GetString(index) method call.

For example:

Dim mailman As New Chilkat.MailMan()
mailman.UnlockComponent("My Code")
Dim sa As Chilkat.StringArray
sa = mailman.MxLookupAll("yahoo.ca")
if sa is nothing then
    TextBox1.Text = sa.GetString(0)
end if


answered Nov 27 '12 at 19:57

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 27 '12 at 17:42

Seen: 1,241 times

Last updated: Nov 27 '12 at 19:57

powered by OSQA