Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Validation , MX Lookup and Dummy Send 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I'm looking to validate emails in our system and wanted some pointers as to what activeX or dll's I would need to use to perform the following..

1. MX lookup for valid MX records
2. Connect to mailserver and attempt to send mail capturing response to validate mailbox.

Also does anyone see any pitfalls I should be aware of trying to perform this?

Cheers,
1DMF.


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
I have used a VB.net app to send out emails from Access. I setup the project as a COM Visible VB.net dll library. You can then use regasm /tlb /codebase mydllfile.dll to register it. You can then see it in Access, and call it to do this for you.

It was so much easier to do this kind of action in .net since the built in libraries already handle email that I tool this direction.

I attached a zip file containing the VS.net 2005 code for the EmailHelper.dll component I use.

Here is a link to .net DNS query code.

Only down side is you have to make sure that the .net framework is installed on clients.

Ray D'Andrade
Access Programmer
 
thanks for the reply, though I know nothing about .NET and don't have Visual Studio, so am reluctant to go down a route I have no experience in.

I'm thinking perhaps I can use the wininet.dll as I do for FTP'ing.

To send email I use hooks into outlook, so sending mail isn't the issue.

is there a way MS Access & VBA can hook into telnet perhaps?

Guess I need to keep digging, any further input is appreciated

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 

That is a link to an ActiveX DNS control you can buy. If you're looking for free code, I don't see any out there. Dart also has a mail control.

Here is one for cheaper.

Learning VB.net may be easier than trying to do socket programming in VBA. This is something I would typically buy a control for or build in .NET.

Ray D'Andrade
Access Programming
 
Many thanks for your feedback Ray, much appreciated.

I'm looking to add this into a company database that is written entirely in VBA MS Access, so the environment is dictated to me.

I'm working on a this as web functionality also using PERL and IO:SOCKET.

I know I can use followhyperlink in VBA to trigger web apps, as I do this already, but I'm not sure if there is a way you can fire a webapp and capture the result in VBA.

any thoughts on that approach?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
A little code below to open a web browser, and navigate to a page. sPageContents is a string variable containing what the web server returned. Is this what you are looking for?

Ray D'Andrade
Bright Network - Custom Software Development

Code:
Dim oWeb As Object

Set oWeb = CreateObject("InternetExplorer.Application")
With oWeb
'.Visible = True
.navigate "[URL unfurl="true"]http://mywebserver.com"[/URL]
NavAndWait oWeb

dim sPageContents as string
sPageContents = .Document.Body.innerhtml
end with

Private Sub NavAndWait(ByVal oWeb As Object)
WaitSeconds (2)
While oWeb.busy
'wait until Inet finishes
DoEvents
Wend
WaitSeconds (2)
End Sub
 
You're a diamond, many thanks.

I could use this method the same way I would do AJAX calls, hmm this makes things interesting.



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top