•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,561 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,494 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 983 | Replies: 3
![]() |
•
•
Join Date: Sep 2007
Posts: 28
Reputation:
Rep Power: 2
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:
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:
Rep Power: 2
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".
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
.net .net framework 3.0 access advertisment ajax asp browser code combo custom data development dom dropdownlist email encryption eu feed firefox google imap microsoft module mozilla net news open source opinion outlook penelope phishing professional reader research reuse scam security skin spam spamming sql technology theme thunderbird weather web webmail windows workflow xml xoap
- 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 (Growing an Online Community)
- CDONTS email goes directly to Badmail folder (ASP)
- email mail deliver error?? virus? (Windows NT / 2000 / XP / 2003)
Other Threads in the ASP.NET Forum
- Previous Thread: PostBackUrl
- Next Thread: Page.IsPostBack



Linear Mode