473,569 Members | 2,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sending Automatic Email

I have an online app via webforms. When the user completes the final step...I would like the app to automatically send an email to a specific individual. I'm using the following code:

Imports System.Web.Mail
....
Dim Mail As New MailMessage
Mail.To = "be*******@hemi ngwaysoftware.c om"
Mail.Subject = "Howdy"
Mail.From = "be*******@cox. com"
SmtpMail.SmtpSe rver = "localhost"
SmtpMail.Send(M ail)

I get this Error Message:
The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for be*******@hemin gwaysoftware.co m

Any ideas how to fix this?

Thanks
Nov 20 '05 #1
2 1640
I would check to make sure in IIS under Default SMTP Virtual
Server->Properites->Access->Relay that you have added 127.0.0.1 to that
list. (I don't believe this was necessary with Win2K Pro, but is with XP
Pro)

HTH,
Greg

"Arne Beruldsen" <Ar***********@ discussions.mic rosoft.com> wrote in message
news:D1******** *************** ***********@mic rosoft.com...
I have an online app via webforms. When the user completes the final
step...I would like the app to automatically send an email to a specific
individual. I'm using the following code:

Imports System.Web.Mail
...
Dim Mail As New MailMessage
Mail.To = "be*******@hemi ngwaysoftware.c om"
Mail.Subject = "Howdy"
Mail.From = "be*******@cox. com"
SmtpMail.SmtpSe rver = "localhost"
SmtpMail.Send(M ail)

I get this Error Message:
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for be*******@hemin gwaysoftware.co m

Any ideas how to fix this?

Thanks

Nov 20 '05 #2
That worked...thanks . BUT...the email sits in the Queue. How do I get it to send?

"Greg Burns" wrote:
I would check to make sure in IIS under Default SMTP Virtual
Server->Properites->Access->Relay that you have added 127.0.0.1 to that
list. (I don't believe this was necessary with Win2K Pro, but is with XP
Pro)

HTH,
Greg

"Arne Beruldsen" <Ar***********@ discussions.mic rosoft.com> wrote in message
news:D1******** *************** ***********@mic rosoft.com...
I have an online app via webforms. When the user completes the final
step...I would like the app to automatically send an email to a specific
individual. I'm using the following code:

Imports System.Web.Mail
...
Dim Mail As New MailMessage
Mail.To = "be*******@hemi ngwaysoftware.c om"
Mail.Subject = "Howdy"
Mail.From = "be*******@cox. com"
SmtpMail.SmtpSe rver = "localhost"
SmtpMail.Send(M ail)

I get this Error Message:
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for be*******@hemin gwaysoftware.co m

Any ideas how to fix this?

Thanks


Nov 20 '05 #3

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

Similar topics

1
4139
by: Devonish | last post by:
I am composing an email with Access VB and then sending it from within Access. Everything works correctly (the email actually goes!) but Outlook ask some irritating questions that the user is required to answer. A summary of the relevant code is: Dim mailObj as Outlook.MailItem
5
1521
by: cashdeskmac | last post by:
I am writing a web application will will be hosted on a few peoples laptops as a local application. It will send e-mails once the user connects to the internet. How can I set up the "Mail.From" field if I don't know the address of the user's laptop? I have managed to get it working on my own machine, but setting the "From" filed to...
5
2431
by: Jai | last post by:
Hi, I am in a problem of sending mass emails(newsletter) to my website members. Actually my problem is this: I want to send newsletter to my website members. But I had given a facility for each member to choose different category of products or all products newsletter.
5
2158
by: Zile | last post by:
I am trying to send mail from web page in asp.net 2.0/VB 2005: Dim Poruka As New System.Web.Mail.MailMessage myMessage.From = "matematic@gmail.com" myMessage.To = "matematic@hotmail.com" myMessage.Subject = "Automatic sending mail" myMessage.Body = "Success!" Mail.SmtpMail.Send(myMessage)
14
4640
by: John | last post by:
Hi How does one send email from within a vb.net app? Thanks Regards
0
2306
by: krouxsa | last post by:
Hi There people... Please help me with this query. I want to send 1 email to multiple email addresses stored in a database. Will it be possible? I'm using SQL Server 2005 and already set up the Database mail. I also tested the mail and it works fine. My problem is sending mail to multiple emails recipients stored in a Database
0
986
by: =?Utf-8?B?Q2hhdGVsYWluZQ==?= | last post by:
My system is XP Home Edition SP2. I don't know the version of OE 6 that I have currently, but I receive automatic updates, the most recent OE 6 update about a week ago. Tonight, I tried to send several file attachments with an email that were scanned Word files that had been converted to Photoshop files during the scanning process.. Once I...
3
3012
by: sphinney | last post by:
I've written (actually modified from another post) the following code to automatically send an email message from within Access. Public Function SendEmail(TOstr As String, SUBJECTstr As String, BODYstr As String) As Boolean Dim OUTLOOKobj As Outlook.Application Dim EMAILobj As Outlook.MailItem Dim AB_RS As DAO.Recordset On Error GoTo...
0
1168
by: trram1972 | last post by:
Hi, One error has come while trying to send email automatically using the code snippet - Createdispatch failed w/error. This error is coming only when we are trying to call inside a function. Suppose if we call using button click and manually we click button the error hasn't come. While sending throug automatic mail sending(Using manual...
5
3578
by: wktarin | last post by:
Hi. I'm a relative newcomer to the world of php, and I keep bumping into a problem with a mail () form. I need to send an automatic email to two addresses, but I can't seem to get it to work. One email address works just fine, but I can't get the email sent to two different addresses no matter what I try. Below is my code. If someone could help me...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.