Solved

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

Posted on 2011-03-08
6
382 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
How To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

 

Author Comment

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

Accepted Solution

by:
MarkStepp earned 500 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

617 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