473,405 Members | 2,421 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,405 software developers and data experts.

Problem Sending Email via a web page

I am trying to send an email using SMARTHOST. But I am running into
problems. Hopefully someone will be able to help.

In my web application, I have the following code ...

Imports System.Web.Mail

....
Dim mailObj As New Mail.MailMessage
Dim Hostname As String
Dim IPaddress As String

Hostname = System.Net.Dns.GetHostName()
IPaddress =
System.Net.Dns.GetHostByName(Hostname).AddressList (0).ToString
mailObj.From = _fromAddress
mailObj.To = recipient
mailObj.Cc = cc
mailObj.Bcc = bcc
mailObj.Subject = subject
mailObj.Body = bodyofnote
If attachment <> "" Then
mailObj.Attachments.Add (New
System.Web.Mail.MailAttachment(attachment))
Mail.SmtpMail.SmtpServer = IPaddress
Mail.SmtpMail.Send(mailObj)
I have tried several methods ...
1) If I put "SmartHost" in SmtpMail.SmtpServer then I get ...
"The transport failed to connect to the server."

2) This puts my IP address in SmtpMail.SmtpServer. The error I get is
.... "The message could not be sent to the SMTP server. The transport
error code was 0x800ccc15. The server response was not available"

3) If I put the IP address of our exchange server the error Message is
....
"The message could not be sent to the SMTP server. The transport
error code was 0x800ccc15. The server response was not available"

4) If I put nothing in for SmtpMail.SmtpServer then the error is ...
"The "SendUsing" configuration value is invalid."
Just for kicks, I created a windows application in the same dot net
solution, and called the very same code as my windows app that sends
the email. If I do not put anything in for SmtpMail.SmtpServer then
the email goes through with no problems.

Why would the windows application work but not the Web Application?

Jan 19 '06 #1
1 1535
Hi,

I assume that 80% of these problems is that the used smtp server is not
fuctioning or denies this kind of use.

Mostly is trying it than with another SMTP server the solution.

Probably the best website with information about this is.

http://www.systemwebmail.net/

I hope this helps,

Cor
Jan 20 '06 #2

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

Similar topics

38
by: jrlen balane | last post by:
basically what the code does is transmit data to a hardware and then receive data that the hardware will transmit. import serial import string import time from struct import * ser =...
2
by: Joe | last post by:
Hi, I am sending an email from an asp page. Besides sending an email to sender, I am sending myself a BCC also. Out of 100 emails sent, about 5 recipients received a blank email (no text in...
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
3
by: huan | last post by:
Hi, I am creating a function using C# to send emails with attachment file. And I am using File Field control to get file for attachment. Sending email works fine on development machine, however...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
6
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
4
by: splicemix | last post by:
Hi all, I have recently set up a Drupal website. I am a beginner. My shared host server does not allow nobody@localhost to send emails, and prevents access to php.ini, so I spent some time...
5
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...
2
ThatThatGuy
by: ThatThatGuy | last post by:
Hello reader,, This might be a very simple question, but what to just say about it, i'm facing it Actually i'm developing a web App and i want email feature in that.... I'm sending mail from my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.