| | |
Need help sending email
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 28
Reputation:
Solved Threads: 0
I'm trying to send an email from my contact form using gmail, but i get a runtime error when try to send it.
Heres the code:
Any help would be appreciated!
Thanks
SiPex
Heres the code:
ASP.NET Syntax (Toggle Plain Text)
MailMessage email = new MailMessage(); email.From = new MailAddress(from); email.To.Add(new MailAddress(to)); email.Subject = subject; email.Body = body; email.IsBodyHtml = false; System.Net.NetworkCredential auth = new System.Net.NetworkCredential("username", "password"); System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com", 587); smtp.EnableSsl = true; smtp.UseDefaultCredentials = false; smtp.Credentials = auth; smtp.Send(email);
Any help would be appreciated!
Thanks
SiPex
•
•
Join Date: Sep 2007
Posts: 28
Reputation:
Solved Threads: 0
still getting
•
•
•
•
Server Error in '/' Application.
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".
![]() |
Similar Threads
- Sending email from a shell script (Shell Scripting)
- Sending HTML/Plain text Emails (PHP)
- sending email (ASP.NET)
- Sending HTML email via PHP mail function (PHP)
- ASP: Sending a HTML form to an email address (ASP)
- Sending email from c++ application (C++)
- Need help on sending email with image and text (Social Media and Online Communities)
- CDONTS email goes directly to Badmail folder (ASP)
- email mail deliver error?? virus? (Windows NT / 2000 / XP)
Other Threads in the ASP.NET Forum
- Previous Thread: PostBackUrl
- Next Thread: Page.IsPostBack
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datalist deadlock deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form forms grid gridview gudi homeedition hosting iis image javascript jquery list menu mssql multistepregistration nameisnotdeclared novell objects opera order problem ratings redirect registration relationaldatabases rotatepage search security select serializesmo.table sessionvariables silverlight smoobjects sql ssl tracking treeview typeof validatedate validation vb.net virtualdirectory vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment wizard xml xsl






