Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

System.Net.Mail or 3rd part SMTP component?

Posted on 2011-03-08
6
Medium Priority
?
384 Views
Last Modified: 2012-05-11
Im using VS2010 and VB.net. I want to send emails with attachments in my application.
The app we are using currently is written in VB6 and is using MSMAPI32.OCX and MSWINSCK.OCX to send emails, this works without specifying SMTP server. I cannot specify SMTP sever as our organisation does not permit relay, so I assume its doing some DNS lookups. As I understand I cannot use these active x components or any other for that matter that is targeting .net 4 assemblies?

Its really frustrating that VB6 could manage this and VB.net 4 cannot!

Now I'm testing 3rd party SMTP components like EAsendmail and Easymail, but these cannot manage to send the email when connected with a vpn client for some reason.

All emails are being send internally.

Is there a way to use DNS lookup to send emails with any method with VS2010 4 framework?
System.Net.Mail  seems to be great when using SMTP server, but when not it seems to be useless?

Any suggestions would be appreciated?
Thanks
Dab
0
Comment
Question by:Dabosa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:MarkStepp
ID: 35072121
We have used ANSMTP for years and love the configurablity of the product.  you can download a sample from http://www.emailarchitect.net/easendmail/  and I think it will do what you are requesting.
0
 

Author Comment

by:Dabosa
ID: 35072166
Yes its good but it does not work when using vpn client? The app must work over vpn
0
 
LVL 34

Expert Comment

by:it_saige
ID: 35072434
Just in case you have not already explored this avenue.  How about using MAPI and WINSOCK in your updated program?

Have you also ruled out CDO?

http://xpode.com/ShowArticle.aspx?Articleid=271

-saige-
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Dabosa
ID: 35072747
Thanks, any sampels for use of mapi and winsock?
0
 
LVL 1

Accepted Solution

by:
MarkStepp earned 2000 total points
ID: 35072854
Here is some code we have used with CDO...


<%@ Language=VBScript %>
<%
	'used to call the sub
	SendEmail()


'sub to send email
sub SendEmail()
	Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
	objCDOMail.From = "Your Name <YourEmail@YourDomain.com>"	
	objCDOMail.To = tEmail
	objCDOMail.Bcc = "sales@mark-it-systems.com"
	objCDOMail.Subject = "Your Subject Goes Here!!!"
	tBody = "<b>Thank you</b> for your order!<br><br>"
	tBody = tBody + "This is where the Email Body Goes<br>"
	tBody = tBody + "If you need additional assistance send emails to <a href='mailto:YourEmail@YourDomain.com'>YourEmail@YourDomain.com</a><br><br><br>"
	objCDOMail.BodyFormat=0
	objCDOMail.MailFormat=0
	objCDOMail.Body = tBody

	On Error Resume Next
	objCDOMail.Send
	Set objCDOMail = Nothing
end sub

%>

Open in new window

0
 
LVL 34

Expert Comment

by:it_saige
ID: 35161236
Dabosa,

I have not found anything as of yet, but I am still looking.

-saige-
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

718 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