|
| |
| paggy4u | Asp.Net User |
| Cannot Send E-mail from my live website | 8/24/2006 12:31:26 PM |
0/0 | |
|
I have been facing errors on sending my email from webiste already hosted. The message i get is :- mail cannot be sent, contact system administrator
This is my configuration in web config:-
<system.net> <mailSettings> <smtp> <network host="mail.softmind.biz" port="25" defaultCredentials="true" userName="[email protected]" password="secret"/> </smtp> </mailSettings> </system.net>
Do i need to make changes elsewhere. I cannot send anymail, despite many efforts. My Site settings also has this details. I have been using a LIVE SITE with all functions working except this one. I must have read all threads in this section about email, but no of them applies here. All the suggestions were only for BETA CLASSIFIEDS, and all errors in beta i think are rectified.
So is this a new bug or my mistake somewhere.
I am using the FINAL STARTERKIT.
Pl. suggest me the place, where i am suppose to make changes.
Thanks In advance UPDATED ON 22nd October 2007
Since i recieved many e-mails on how to make changes in web config, I am posting my web config which works smoothly without any problems.
This works perfectly for me and i am able to send emails easily.
This is my web config file for email. pl. change to your "email name" and "password".
<system.net> <mailSettings> <smtp from="
[email protected]"> <network host="mail.website.com
" port="25" userName="[email protected]" password="mypassword" /> </smtp>
</mailSettings> </system.net> Hope this helps all.
Paggy4u ----------------------------------------- An Unblinking eye on IronRuby,Asp.Net and .Net http://ironruby.blogspot.com/ |
| paggy4u | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/28/2006 7:42:06 AM |
0/0 | |
|
No help so far. Can any one please come forward to help me. Thanks paggy4u
Paggy4u ----------------------------------------- An Unblinking eye on IronRuby,Asp.Net and .Net http://ironruby.blogspot.com/ |
| justin0501 | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/28/2006 12:14:48 PM |
0/0 | |
|
Probably something to do with the smtp settings you are providing. Put a break point in your code to debug it and post the actual error message that is thrown instead of that custom error message. You may get more responses that way |
| paggy4u | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/28/2006 1:10:15 PM |
0/0 | |
|
I did the same trick in the past, but with no results.
i really need help in this case, as it has stopped all my progress. Mr. Marcgel, can you kindly come forward to help me, whenever you are free. Thanks
Paggy4u ----------------------------------------- An Unblinking eye on IronRuby,Asp.Net and .Net http://ironruby.blogspot.com/ |
| paggy4u | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/29/2006 9:29:46 AM |
0/0 | |
|
Hello The problem is not solved yet. I have already made the changes in config file <customErrors mode="Off"/> yet i get the same responses. Even if i remove the friendly error message in html which is hidden inside view panel, it will not show any error. The showad.aspx.cs is as follows.. Imports System Imports System.Text Imports System.Web.UI Imports System.Web.UI.WebControls Imports AspNet.StarterKits.Classifieds.BusinessLogicLayer Imports AspNet.StarterKits.Classifieds.Web It does not import system.net .mail, Is this the problem or anything else. If any one solved this problem then pl. share here. Thanks
Paggy4u ----------------------------------------- An Unblinking eye on IronRuby,Asp.Net and .Net http://ironruby.blogspot.com/ |
| justin0501 | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/29/2006 12:12:24 PM |
0/0 | |
|
I'm using the vb version but if you look at where it sends the email it makes a call to Ads.vb or .cs in the BLL I'm not exactly what function you are trying to do but Here are both the functions(vb version) Public Shared Function SendAdInEmail(ByVal adId As Integer, ByVal senderName As String, ByVal senderAddress As String, ByVal recipientEmail As String, ByVal subject As String, ByVal message As String) As Boolean Dim sent As Boolean = False Dim from As String = String.Format("{0} <{1}>", senderName, senderAddress) Try Dim m As New MailMessage(from, recipientEmail) m.Subject = subject m.Body = message Dim client As New SmtpClient() client.Send(m) sent = True Catch ex As Exception ' Consider customizing the message for the EmailNotSentPanel in the ShowAds page. sent = False End Try Return sent End Function
Public Shared Function SendResponse(ByVal adId As Integer, ByVal senderName As String, ByVal senderAddress As String, ByVal comments As String) As Boolean Dim sent As Boolean = False Dim s As SiteSettings = SiteSettings.GetSharedSettings() Dim ad As AdsDataComponent.AdsRow = GetAdById(adId) If Not (ad Is Nothing) Then Dim adUser As MembershipUser = Membership.GetUser(ad.MemberName) If Not (adUser Is Nothing) Then
Dim sb As New StringBuilder() sb.AppendFormat("A user has sent a response to your Ad '{0}' at {1}", ad.Title, s.SiteName) sb.AppendLine() sb.AppendLine() sb.AppendLine("The contact information of the user is below:") sb.AppendLine() sb.AppendLine(("Name: " + senderName)) sb.AppendLine(("Email: " + senderAddress)) sb.AppendLine() sb.AppendLine("User comments/questions:") sb.AppendLine(comments) sb.AppendLine() sb.AppendLine("You can respond to the user by using the Reply feature of your email client.") sb.AppendLine() sb.AppendLine(s.SiteName) sb.AppendLine(ClassifiedsHttpApplication.SiteUrl) Dim from As String = String.Format("{0} <{1}>", senderName, senderAddress) Try Dim m As New MailMessage(from, adUser.Email) m.Subject = "Response for Ad: " + ad.Title m.Body = sb.ToString() Dim client As New SmtpClient() client.Send(m)
IncrementResponseCount(adId) sent = True Catch ex As Exception ' Consider customizing the message for the EmailNotSentPanel in the ShowAds page. sent = False End Try End If End If Return sent End Function I think you need to comment out the Try, the Catch, the End Try, and the sent = true and sent = false. Then if you run it, it should give you the error if your custom errors are off in your web.config |
| justin0501 | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/29/2006 12:12:24 PM |
0/0 | |
|
I'm using the vb version but if you look at where it sends the email it makes a call to Ads.vb or .cs in the BLL I'm not exactly what function you are trying to do but Here are both the functions(vb version) Public Shared Function SendAdInEmail(ByVal adId As Integer, ByVal senderName As String, ByVal senderAddress As String, ByVal recipientEmail As String, ByVal subject As String, ByVal message As String) As Boolean Dim sent As Boolean = False Dim from As String = String.Format("{0} <{1}>", senderName, senderAddress) Try Dim m As New MailMessage(from, recipientEmail) m.Subject = subject m.Body = message Dim client As New SmtpClient() client.Send(m) sent = True Catch ex As Exception ' Consider customizing the message for the EmailNotSentPanel in the ShowAds page. sent = False End Try Return sent End Function
Public Shared Function SendResponse(ByVal adId As Integer, ByVal senderName As String, ByVal senderAddress As String, ByVal comments As String) As Boolean Dim sent As Boolean = False Dim s As SiteSettings = SiteSettings.GetSharedSettings() Dim ad As AdsDataComponent.AdsRow = GetAdById(adId) If Not (ad Is Nothing) Then Dim adUser As MembershipUser = Membership.GetUser(ad.MemberName) If Not (adUser Is Nothing) Then
Dim sb As New StringBuilder() sb.AppendFormat("A user has sent a response to your Ad '{0}' at {1}", ad.Title, s.SiteName) sb.AppendLine() sb.AppendLine() sb.AppendLine("The contact information of the user is below:") sb.AppendLine() sb.AppendLine(("Name: " + senderName)) sb.AppendLine(("Email: " + senderAddress)) sb.AppendLine() sb.AppendLine("User comments/questions:") sb.AppendLine(comments) sb.AppendLine() sb.AppendLine("You can respond to the user by using the Reply feature of your email client.") sb.AppendLine() sb.AppendLine(s.SiteName) sb.AppendLine(ClassifiedsHttpApplication.SiteUrl) Dim from As String = String.Format("{0} <{1}>", senderName, senderAddress) Try Dim m As New MailMessage(from, adUser.Email) m.Subject = "Response for Ad: " + ad.Title m.Body = sb.ToString() Dim client As New SmtpClient() client.Send(m)
IncrementResponseCount(adId) sent = True Catch ex As Exception ' Consider customizing the message for the EmailNotSentPanel in the ShowAds page. sent = False End Try End If End If Return sent End Function I think you need to comment out the Try, the Catch, the End Try, and the sent = true and sent = false. Then if you run it, it should give you the error if your custom errors are off in your web.config |
| paggy4u | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/29/2006 1:27:51 PM |
0/0 | |
|
Dear Justin501, As per your advice i created the comments and finally manged to find a common error in both the emails (1) Send Ad as an Email and (2) Respond to Ad. In both the emails it takes a common error Line 485: client.Send(m); here is the complete error. But please note, whatever error it throws, the emails are working and the mail box are available. but here it does not take the members email as valid. here is the ERROR details for Send ad as email
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <[email protected]> No such user here
Source Error:
Line 427: m.Body = message; Line 428: SmtpClient client = new SmtpClient(); Line 429: client.Send(m); Line 430: // sent = true; Line 431: }
Source File: e:\virtuals\softmind.biz\wwwroot\App_Code\BLL\Ads.cs Line: 429 In this case rahil28 is a guest willing to send this ad as an email ---------------------------------------------------HERE IS THESECOND ERROR ----------------------------------------------------- here is the ERROR details for RESPOND TO AD
Mailbox unavailable. The server response was: <[email protected]> No such user here Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <[email protected]> No such user here
Source Error:
Line 483: m.Body = sb.ToString(); Line 484: SmtpClient client = new SmtpClient(); Line 485: client.Send(m); Line 486: Line 487: IncrementResponseCount(adId);
Source File: e:\virtuals\softmind.biz\wwwroot\App_Code\BLL\Ads.cs Line: 485 Again let me inform that Sugarsmile is a member, who has already posted an advt online and the mailbox is in fact available.
I hope this details are enough to start with. I hope there are no more errors after this.
Pl. guide me and thanks again for giving me a start in this direction.
Paggy4u
Paggy4u ----------------------------------------- An Unblinking eye on IronRuby,Asp.Net and .Net http://ironruby.blogspot.com/ |
| paggy4u | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 8/30/2006 1:51:18 PM |
0/0 | |
|
Thanks buddy ( Justin )
thanks a lot for your kind effort in getting me my work done.
Yes finally i am able to send the emails from my website. The actual problem was the SMTP Server was not getting recognised and hence credentials were not passed for authentication.
Oops! a real nightmare for last 3 days. I am relaxed now.
Thanks again Paggy4u
Paggy4u ----------------------------------------- An Unblinking eye on IronRuby,Asp.Net and .Net http://ironruby.blogspot.com/ |
| revkev | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 6/6/2007 10:00:32 PM |
0/0 | |
|
I am having this same problem.... how did you get this resolved?????
And I say unto you, Ask, and it shall be given you; seek, and ye shall find; knock, and it shall be opened unto you... LK 11:9 http://adventwebdesign.net |
| revkev | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 6/7/2007 3:49:00 AM |
0/0 | |
|
resolution: I just had to set the smtp authentication in the we.config and it worked perfectly! <system.net> <mailSettings> <smtp deliveryMethod="Network">
<network defaultCredentials="false" host="mail.blah.com"
password="xxxx" port="25" userName="[email protected]"/> </smtp> </mailSettings> </system.net>
And I say unto you, Ask, and it shall be given you; seek, and ye shall find; knock, and it shall be opened unto you... LK 11:9 http://adventwebdesign.net |
| devinmccloud | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 6/21/2007 10:57:05 PM |
0/0 | |
|
Hey guys,
I really think that the Classified site need a "Contact Page". I wrote my own and added it to my site. If anyone is interested in something like this contact me I will gladly share the code (C#). Here's what it looks like: Here
Jer |
| old geezer | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 9/11/2007 2:40:31 PM |
0/0 | |
|
sounds a good idea would the code work for VB or what changes would need to be made plz. and could you send the code to my email [email protected] please in advance ty.
If it works leave it, if it dont kick it |
| old geezer | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 9/11/2007 7:47:05 PM |
0/0 | |
|
well enterd the code as is made changes for my email provider and good news I can now send emails from site.
Thanx very much.
Old geezer.
My site can be found hear im running it and hosting myself on a old computer at home.
www.letshaggle.co.uk.
look in give your comments or surgestions all welcome.
If it works leave it, if it dont kick it |
| paggy4u | Asp.Net User |
| Re: Cannot Send E-mail from my live website | 10/22/2007 10:51:21 AM |
0/0 | |
|
Hi, I have updated this thread with a working solution.
Pl.see the first post in this thread. Thanks
Paggy4u ----------------------------------------- An Unblinking eye on IronRuby,Asp.Net and .Net http://ironruby.blogspot.com/ |
|
| |
Free Download:
Books: Strategic Database Marketing: The Masterplan for Starting and Managing a Profitable, Customer-based Marketing Program Authors: Arthur Middleton Hughes, Pages: 437, Published: 2005 Beginning Microsoft Office Live: Build Your Own Web Site Quickly and Easily Authors: Rahul Pitre, Pages: 350, Published: 2007 Reframing Evaluation Through Appreciative Inquiry Authors: Hallie S. Preskill, Tessie Tzavaras Catsambas, Pages: 170, Published: 2006 The Martha Rules: 10 Essentials for Achieving Success as You Start, Build, Or Manage a Business Authors: Martha Stewart, Pages: 205, Published: 2005 Living Homes: Integrated Design & Construction Authors: Thomas J. Elpel, Pages: 233, Published: 2005 The American Directory of Writer's Guidelines: More Than 1,700 Magazine Editors and Book Publishers Explain What They Are Looking for from Freelancers Authors: Stephen Blake Mettee, Michelle Doland, Doris Hall, Pages: 816, Published: 2006 Journey with a Baja Burro Authors: Graham Mackintosh, Pages: 358, Published: 2000 Psychiatric Mental Health Nursing: An Introduction to Theory and Practice Authors: Patricia O'Brien, Winifred Z. Kennedy, Karen A. Ballard, Pages: 598, Published: 2007 Writing Exceptional Missionary Newsletters: Essentials for Writing, Producing and Sending Newsletters that Motivate Readers Authors: Sandy Weyeneth, Pages: 125, Published: 2004 Start Your Own Wedding Consultant Business Authors: Eileen Figure Sandlin, Leann Anderson, Rieva Lesonsky, Pages: 152, Published: 2003 Web:Microsoft Office Live Small Business Community | e-mail from new ... e-mail from new web site does not forward to my live/hotmail inbox ... I beleive that you can not send an e-mail from your website to the same e-mail ... Cannot Send Email With Windows Live Mail - POP and IMAP | Google ... down my ability to use my Windows Live Mail program to send out mail. Is this possible? ... Subject: Re: Cannot Send Email With Windows Live Mail ... Cannot send email from Windows live mail - Vista Forums Cannot send email by Windows Live Mail, datoyong, Vista General ... Vistax64.com is an independent web site and has not been authorized, ... Cannot Send email from Charter in Windows Live Mail - Windows ... When I send mail from my GMAIL account within Windows Live Mail, I get no errors . ...... Cannot send email by Windows Live Mail, datoyong, Vista Help ... Cannot send e-mail invitations from Meet Now meeting in Live ... If I log into his PC with my login name, I have no issues sending e-mail invites ... Error message when you try to send an e-mail invitation in Live Meeting ... Gmail (Google mail) - The solution Aug 6, 2008 ... Gmail allows you to send instant live messaging with its ... Cant access mail from outlookHi its been 2 days i can't read my mails on ... Can't send Windows Live emails (hotmail) on phone in Windows Live ... my hotmail/windows live account. I can use my email just fine on a PC, no problems. I can view my email just fine on my phone. I cannot send ... Apple - Support - Discussions - Suddenly cannot send email through ... I live in Okinawa... So, a genius bar is out of the question. :/ ... But, the answer is no, I cannot send mail through my ISPs mail server either. ... Live Meeting Client Cannot send invite via Email - Office ... Answer Re: Live Meeting Client Cannot send invite via Email ... I want to use second option as my live meeting is being integrated to the OCS locally hosted ... Cannot send email in Windows Live - Vista Forums I cannot send email with attachments through windows live mail Have turned off all ... Vistax64.com is an independent web site and has not been authorized, ... Videos: Semwise - The Newborn - 02 - Make You Look One of the tracks that's on my new mixtape!!! I...
(more)
Added: March 30, 2008
One of the tracks that's on my new mixtape!!! I'm working on a webs... The Queue: February 27, 2007 I'M RICH DEMURO AND YOU'RE IN THE QUEUE - THE BEST THREE MINUTES YOU'LL SPEND AT WORK ALL DAY.
LET'S GET YOU STARTED WITH YOUR MUST SEE MOMENT...
A T... Ca$h Gifting: The top ten reasons to be live it works. Are you willing to take in some extra income, or just in all quit your job.
Well if that's what you want then I've got the perfect opportunity for yo... King of the World - JRB karaoke contest Oh. my. GAWD! I have always loved this song, but never thought I would actually sing it. It is high and hard as ballz!!! I can't believe I did it! I... Gracie orphan children home video. http://www.jesusprayerministries.com
Gracie Ministries
Gracie Ministries a registered non-profit, charitable organization is founded in 1996 by B.S.S... Sermon 1-13-2008 Redeemer Ev. Lutheran Church, Yakima, WA [ CLOSED CAPTIONED ] "God does not show favoritism". Sermon delivered by Pastor Timothy Schwartz using scriptural reference to "Acts" and "Galatians". Here he explains ... Cheap Airfares - Last Minute Flights - Discount Tickets http://www.online-mystery-shopper.com/yt/cfares/
(Safe Shopping Link)
Cheap Airfares
cFares connects you to the lowest fares direct from airlines, m... MLM Network Marketers: Full overview of the mastermind system (Your.SponsorDaddy.net) http://your.sponsordaddy.net
Sponsor Daddy is a new Internet and Email Marketing System. It is simple to use and explain and very replicable. It is ... Sermon 5-18-2008 Redeemer Ev. Lutheran Church, Yakima, WA [ CLOSED CAPTIONED ] [ These videos also appear concurrently on our website in higher quality formats, also with closed captioning for people with hearing difficulties ]
... MLM Leads Network Marketing Leads Sponsoring Online with Sponsor Daddy http://www.SponsoringOnline.com
Sponsor Daddy is a new Internet and Email Marketing System. It is simple to use and explain and very replicable. It... |
|
Search This Site:
|
|