473,378 Members | 1,523 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,378 software developers and data experts.

smtp hosted error

hi iam using code like below
Expand|Select|Wrap|Line Numbers
  1. System.Web.Mail.MailMessage mm = new System.Web.Mail.MailMessage();
  2.  
  3.                   mm.From = "info@aciin.com";
  4.  
  5.                   mm.To = txt_email.Text;
  6.                   mm.Subject = "Conformation your Activation Account";
  7.                   mm.BodyEncoding = System.Text.Encoding.UTF8;
  8.                   mm.Body = cont;
  9.                   mm.BodyFormat = System.Web.Mail.MailFormat.Html;
  10.                   SmtpMail.SmtpServer = "mail.aciin.com";
  11.               SmtpMail.Send(mm);
this above code is working from my local system.
but aftermy site is hosted it will display error

please help me
Aug 14 '08 #1
8 1064
DrBunchman
979 Expert 512MB
Hi brettokumar,

What's the error that you are receiving?

Dr B
Aug 14 '08 #2
hi my error is

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Aug 14 '08 #3
DrBunchman
979 Expert 512MB
Can you change the CustomErrors tag in your Web.Config file so the mode property is set to "Off" as described above. Doing this will prevent the generic message above from displaying and give you the details of the actual exception that was thrown.

Thanks,

Dr B
Aug 14 '08 #4
hi now i m gettin error likd this
System.Runtime.InteropServices.COMException: The transport failed to connect to the server.

in this line SmtpMail.Send(mm);
Aug 14 '08 #5
Plater
7,872 Expert 4TB
1) System.Web.Mail is depreciated (unless yo uare still using .NET1.1) and you should be using System.Net.Mail

2) You are not actually defining the mail server you are trying to connect to, which means it will try to use the default. Which is either localhost or a default one supplied in your web.config. Which probably means there IS no localhost smtp server running on that system. Specify which smtp server you want to send mail through and try that?
Aug 14 '08 #6
now i am getting error was
The server response was: 553
Aug 14 '08 #7
Plater
7,872 Expert 4TB
now i am getting error was
The server response was: 553
553 - The command was aborted because the mailbox name is invalid.
You will need to use valid email addresses
Aug 14 '08 #8
DrBunchman
979 Expert 512MB
This could be caused by a number of issues, try the following and see if you have any success.

Is the mail server name being resolved properly by the DNS? Try using the IP address if you are not sure.

Have you got any firewalls or proxy servers that might be preventing you from connecting to the mail server? I've had problems with certain McAfee settings blocking mail before.

Have you got the default smtp server installed on your deployment machine? If so try sending mail via that (Set the SmtpServer property to "127.0.0.1") and see if that works.

Let me know how you get on,

Dr B

EDIT: Too slow! Must have taken ages writing this post...:-)
Aug 14 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike Obiku | last post by:
First of all, I'm new to PHP. For my website I have some PHP scripts to run a photo database. New users have to register them selfs. After registring the new user is getting an e-mail maid by an...
2
by: Dan Boyle | last post by:
Hi, I am having difficulty connection to an smtp host. I am using the following code but I don't think I fully understand what smtp host can be used. function setSMTPParams($host = null,...
4
by: Gerhard | last post by:
Hi, I some asp.net beta 2 code that works fine on an XP Pro machine, but on a Windows 2003 Server gets the following error: System.Net.Mail.SmtpFailedRecipientException {"Mailbox unavailable....
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
2
by: zubair | last post by:
Hello All I have just comeacross a problem: I'm debugging a site on my local computer using Visual Studio.net. When I send mail it gives error "System.Runtime.InteropServices.COMException: The...
2
by: BrianDH | last post by:
Hi I have a VB.Net windows application that’s running on 30 PCs. All in the same network. All PCs run XP Pro. All PCs have Framework 1.1 2 of the PC throw an error when they try to send mail...
0
by: ctk70 | last post by:
In VS2005, I get an error trying to send email. Using SmtpClient in Visual Studio 2005, I get the error: Unable to read data from the transport connection: net_io_connectionclosed A code...
4
by: Bgreer5050 | last post by:
I keep getting the following error on an asp form I have on my site. I know the smtp settings are correct, because if I take out the user fields (i.e. name, weight and assign a text string in code...
1
by: Jeff | last post by:
I am receiving the following error: // error: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 No...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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...
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?
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...

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.