473,385 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB.Net and Email

Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook 2003,
so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the program.

Any ideas?
Nov 22 '05 #1
4 2205
How are you sending the email? Its very easy to send email from .Net using
the System.Messaging namespace.

Here's a sample

Dim oMessage As New System.Web.Mail.MailMessage()

oMessage.To = "An*******@ADomain.com"
oMessage.From = "My*****@MyDomain.com"
oMessage.Subject = "A New Email Message"
oMessage.Body = "I hope you get this email! I’ll talk to you later!"

' This part is required if your mail server requires authenticatio
oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.sendmail.com
oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "My*****@MyDomain.com
oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "MyPa$$word"

oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

System.Web.Mail.SmtpMail.SmtpServer = "mail.sendmail.com"

Try
System.Web.Mail.SmtpMail.Send(oMessage)

Response.Write("Email sent!")
Catch Ex As Exception
Response.Write("Unable to send mail! " & Ex.Message)
End Try

I hope this helps.

"John" wrote:
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook 2003,
so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the program.

Any ideas?

Nov 22 '05 #2
Currently I am used the Microsoft Outlook 11.0 Object Library.

"Joel Cade" wrote:
How are you sending the email? Its very easy to send email from .Net using
the System.Messaging namespace.

Here's a sample

Dim oMessage As New System.Web.Mail.MailMessage()

oMessage.To = "An*******@ADomain.com"
oMessage.From = "My*****@MyDomain.com"
oMessage.Subject = "A New Email Message"
oMessage.Body = "I hope you get this email! I’ll talk to you later!"

' This part is required if your mail server requires authentication
oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.sendmail.com"
oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "My*****@MyDomain.com"
oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "MyPa$$word"

oMessage.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

System.Web.Mail.SmtpMail.SmtpServer = "mail.sendmail.com"

Try
System.Web.Mail.SmtpMail.Send(oMessage)

Response.Write("Email sent!")
Catch Ex As Exception
Response.Write("Unable to send mail! " & Ex.Message)
End Try

I hope this helps.

"John" wrote:
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.

We have one machine with XP service pack 1. It works fine there. This also
was upgraded from outlook 200 to outlook 2003.

On two new machines, we have XP Service Pack 2. They came with outlook 2003,
so no upgrade was needed. On these machines, we get an error stating that
"modAgentSys can not create activex component" which then crashes the program.

Any ideas?

Nov 22 '05 #3
John,

John,

This I added to the messagethread in VBNet

Can you see if this is maybe a solution for you

http://www.dimastr.com/redemption/

I don't know nothing of it only that it exist.

Cor

Nov 22 '05 #4
"John" <Jo**@discussions.microsoft.com> wrote:
Having a problem sending emails through vb.net. Our inhouse software
automatically sends an email to the programming staff whenever an error is
encountered.

This code works just fine on machines that are windows 2000 based. We
recently upgraded from Outlook 2000 to Outlook 2003, and it still works.


I've used Indy (http://www.IndyProject.org/) for emailing to get
around this issue of not knowing what components and versions are
installed on what machines. Put the Indy files in the app directory
and it seems to work everywhere regardless of what they install or
change elsewhere on the machine.

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
by: BSG-SMTP-Gateway | last post by:
The following message sent by this account has violated system policy: Connection From: 64.253.55.90 From: python-list@python.org To: terriss@birdsall.com, q4dzsAEAAAAA@birdsall.com,...
26
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
3
by: g0c | last post by:
hi, how to hide or replace email addresses in php mail function with something like "group" so the email addresses to which email is sent are not visible ? i have : $subs = "email1@dot.com,...
3
by: Erik Johnson | last post by:
THE GOAL: I need to send an email with a simple ASCII text body and an attached HTML file. I have scripts that send basic emails via the smtplib module that don't have any attachements and that...
15
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
3
by: IGD | last post by:
I don't know if this is the right place to post this or not. If not, could someone direct me elsewhere where I would find more information on how to solve my problem? Thanks! My problem is this:...
27
matheussousuke
by: matheussousuke | last post by:
I'm having trouble with e-mail sending, I mean, the website is suposed to send a confirmation email after sign up, but it gets like text plain instead of HTML May someone help me, please? ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.