CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
Explore    Item Entry    Members   
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 4/10/2007 1:22:37 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 6 Views: 14 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
7 Items, 1 Pages 1 |< << Go >> >|
adkboards
Asp.Net User
Send Email with GoDaddy??4/10/2007 1:22:37 AM

0/0

I am trying to send an email to myself from a webform. GoDaddy says to use the following:

 

// language -- C#
// import namespace
using System.Web.Mail;

private void SendEmail()
{
   const string SERVER = "relay-hosting.secureserver.net";
   MailMessage oMail = new System.Web.Mail.MailMessage();
   oMail.From = "emailaddress@domainname";
   oMail.To = "emailaddress@domainname";
   oMail.Subject = "Test email subject";
   oMail.BodyFormat = MailFormat.Html; // enumeration
   oMail.Priority = MailPriority.High; // enumeration
   oMail.Body = "Sent at: " + DateTime.Now;
   SmtpMail.SmtpServer = SERVER;
   SmtpMail.Send(oMail);
   oMail = null; // free up resources

 

When I try this, (substituting the correct information), nothing happens, no error messages, no email, nothing. Does anyone know the correct way to send an email from GoDaddy?

 

Thanks 

AshokRaja
Asp.Net User
Re: Send Email with GoDaddy??4/10/2007 6:27:58 AM

0/0

Try your sample code with a valid To and From ID it will work.

The same problem has been resolved by me in this thread.

Have a look into it

http://forums.asp.net/thread/1642349.aspx

Moreover consider these things also.

oMail=null is not necessary any how it will automaticatically destroy after completing the execution of this event.

and on Body convert the DateTime.Now to DateTime.Now.ToString();

Even though it doesn't through any compile time error its a best practice to convert that date object to be concated to a string

Hope it will help you.

Let me know if you need any further clarifications

 


Ashok Raja
www.iGold.in

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
adkboards
Asp.Net User
Re: Send Email with GoDaddy??4/10/2007 12:35:21 PM

0/0

Hi, thanks for your help, but I tried what you suggested and it still does nothing. I am calling this procudure from a button control on my form page, could this have something to do with it? Here is the code:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Mail;

public partial class Register_aspx : PageBase
{
    protected void btnSendmail_Click(object sender, EventArgs e)
    {
        const string SERVER = "relay-hosting.secureserver.net";
   MailMessage oMail = new System.Web.Mail.MailMessage();
   oMail.From = "actual email address";
   oMail.To = "actual email address";
   oMail.Subject = "Test email subject";
   oMail.BodyFormat = MailFormat.Html; // enumeration
   oMail.Priority = MailPriority.High; // enumeration
   oMail.Body = "Sent at: " + DateTime.Now.ToString();
   SmtpMail.SmtpServer = SERVER;
   SmtpMail.Send(oMail);
   oMail = null; // free up resources
   lblStatus.Text="Email Was Sent!";
   }
}

The text of the lblStatus control also does not get changed. I tried this code with a "try / catch" and the catch did not change the lblStatus control's text either. Thank you again for your help. 

AshokRaja
Asp.Net User
Re: Send Email with GoDaddy??4/10/2007 1:29:20 PM

0/0

Hi Friend,

Try this part of code

const string SERVER = "relay-hosting.secureserver.net";

MailMessage oMail = new System.Net.Mail.MailMessage();

oMail.From =

new MailAddress("[email protected]");

oMail.To.Add(

"[email protected]");

oMail.Subject =

"<html><boby>Test email subject</body></html>";

oMail.IsBodyHtml =

true; // enumeration

oMail.Priority =

MailPriority.High; // enumeration

oMail.Body =

"Sent at: " + DateTime.Now.ToString();

SmtpClient Client = new SmtpClient(SERVER);

Client.Send(oMail);

Hope this will help you 

 


Ashok Raja
www.iGold.in

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
AshokRaja
Asp.Net User
Re: Send Email with GoDaddy??4/10/2007 1:32:20 PM

0/0

Hi friend ,

Replace the value of Body with the subject.


Ashok Raja
www.iGold.in

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
adkboards
Asp.Net User
Re: Send Email with GoDaddy??4/10/2007 5:01:20 PM

0/0

Hi, thanks again for your help, but it still does nothing. Here is my new code, did I miss something?

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;

public partial class Register_aspx : PageBase
{
    protected void btnSendmail_Click(object sender, EventArgs e)
    {
        const string SERVER = "relay-hosting.secureserver.net";
   MailMessage oMail = new System.Net.Mail.MailMessage();
   oMail.From = new MailAddress("actual email address");
   oMail.To.Add("actual email address");
   oMail.Subject = "<html><body>Test email subject</body></html>";
   oMail.IsBodyHtml = true; // enumeration
   oMail.Priority = MailPriority.High; // enumeration
   oMail.Body = "Sent at: " + DateTime.Now.ToString();
   SmtpClient Client = new SmtpClient(SERVER);
   Client.Send(oMail);
   oMail = null; // free up resources
   lblStatus.Text="Email Was Sent!";
   }

Thanks again 

AshokRaja
Asp.Net User
Re: Send Email with GoDaddy??4/10/2007 6:00:24 PM

0/0

Hi Friend,

Try adding the User Credentials for mail

the code is

System.Net.NetworkCredential cr = new System.Net.NetworkCredential("myLogin For Email Administration", "Password");

Client.Credentials=cr;

Full Code  

const string SERVER = "myServer";

MailMessage oMail = new MailMessage();

oMail.From =new MailAddress("[email protected]");

oMail.To.Add("[email protected]");

oMail.Subject ="Sent at: " + DateTime.Now.ToString();

oMail.IsBodyHtml =true; // enumeration

oMail.Priority =

MailPriority.High; // enumeration

oMail.Body =

"<html><boby>Test email subject</body></html>";

SmtpClient Client = new SmtpClient(SERVER);

System.Net.

NetworkCredential cr = new System.Net.NetworkCredential("myLogin For Email Administration", "Password");

Client.Credentials=cr;

Client.Send(oMail);

lblStatus.Text =

"Email Was Sent!";

provide your username and password in network creditials it should work. I have tried this code with my user credentials and its working fine.

Hope it will help you


Ashok Raja
www.iGold.in

Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
7 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

GoDaddy ASP emailer form HELP, Please! - macromedia.flash.actionscript ... ... GoDaddy with Windows and they use some file gdform.asp to send the email somehow. ... <p>E-Mail:<input type="text" name="email" /></p> ...
ng.asp-net-forum.windows_hosting-hosting_open_forum/9 - Web Programming ... Email Sending with NetworkSolutions. 1. 2. 11/27/2006 1:35:48 PM ... Send Email with GoDaddy? ... Hosting " Hosting Open Forum " Send Email with GoDaddy? ...
Web-Based Email :: Login Version 4.14. Web-Based Email may not be loading because the Security level for ... To access Web-Based Email, make sure that Javascript is enabled on your Web ...
Send Email Limit for SMTP Mail Servers - The Basics Send Email Limit for Outgoing SMTP Mail Servers - what you need to know before sending marketing emails from your email account. The goal of this article is to show ...
Email Designed to Fit Your Needs! Go Daddy has teamed up with Microsoft® to deliver fast, secure, ultra-reliable email, ... I set up Outlook with my GoDaddy.com email account? What is SMTP ...
Mail server SMTP email send - rate limit - for web hosting providers ... apply when sending emails from a web site / domain hosted by GoDaddy: ... compliance with its requirements, and may block the transmission of e-mail that ...
Why does my email account show that it is pending setup: validating MX ... Why does some email I send get bounced back with the error message 554? ... my problem. Copyright © 2005 - 2008 GoDaddy.com, Inc. All rights reserved. Privacy ...
Problem Sending Email in Clubsite with Go Daddy - ASP.NET Forums Follow up - Godaddy told me that in order to send email from code, it is ... under: sending email godaddy port. Re: Problem Sending Email in Clubsite with Go Daddy ...
Send Email with GoDaddy?? - ASP.NET Forums ASP.NET Forums " Windows Hosting " Hosting Open Forum " Send Email with GoDaddy?? Previous Next ... Re: Send Email with GoDaddy?? 04-10-2007, 8:35 AM ...


 
All Times Are GMT