Error trying to send email - CDO.Message

Thanks for taking the time to read my post. :-)

I'm having a problem sending an email message. I keep getting an error "Could not access 'CDO.Message' object."
After looking at the help for Smtp.Send it looks like this is a data error but I've tried to call both send routines, one with a MailMessage object and one with all the text strings.
Here's the code I wrote:

string strBody = "";
MailMessage BidRequest = new MailMessage();
foreach (string s in Request.Form.AllKeys)
{
if ((s == "__VIEWSTATE") || (s == "Button1"))
continue;
object o = Request.Form.Get(s);
string v = o.ToString();
strBody += string.Format("{0}:\t\t\t{1}\n",s,v);
}
BidRequest.To = tgUtility.ContactEmailAddress;
BidRequest.Subject = "Contact Request";
BidRequest.Body = strBody;
BidRequest.BodyFormat = System.Web.Mail.MailFormat.Text;
BidRequest.From = "Hansen Pole Buildings Web Site";

SmtpMail.SmtpServer = tgUtility.SmtpServer;
try
{
SmtpMail.Send(BidRequest);
}
catch(Exception err)
{
lblError.Visible=true;
}

Any help you can provide would be greatly appreciated.
0
Dan
6/29/2004 4:26:52 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

2 Replies
856 Views

Similar Articles

[PageSpeed] 40

Hi,

this site has a lot of data on mailing from .NET: www.systemwebmail.net. You'll probably find an answer over there.
Grz, Kris.
Read my blog. Handy Firefox plugins for web developers.


Workaround for non working Mark as answer buttons.
0
XIII
6/29/2004 6:37:52 PM
Check these articles please, on how to send an email using asp.net:

1- Send-Email-using-ASPNET-formatted-in-HTML
2- Using ASP.NET To Send Email
regards,
Bilal Hadiar, MCP, MCTS, MCPD, MCT
Microsoft MVP - Telerik MVP
0
haidar_bilal
6/29/2004 8:31:48 PM
Reply:

Similar Artilces:

send web email from web form error help
Hi, When send email with attachment from web form. I got an error message as below. What it is? Can someone help? Server Error in '/dotNet' Application. -------------------------------------------------------------------------------- The transport lost its connection to the server. Hi There, Please check the following link The transport failed to connect to the server Hope this helps Sunny NAGIProper Preparation Prevents Poor PerformanceDont forget to click "Mark as Answer" on the post that helped you....

Trying to send an email from a web form
I'm trying to send an email from a web form:  MailMessage Msg = new MailMessage(); Msg.To.Add(new MailAddress(ToPerson));Msg.From = new MailAddress(FromPerson); Msg.Subject = Subject; Msg.Body = BodyText;Msg.BodyEncoding = System.Text.Encoding.UTF8; Msg.SubjectEncoding = System.Text.Encoding.UTF8;Msg.Attachments.Add(new Attachment(FileName)); SmtpClient Client = new SmtpClient("127.0.0.1");Client.Send(Msg); I get  the exceptions: Unable to send email Unable to connect to remote server  What should I be specifying as the remote server for the smtp c...

Sending an Email message from a web form
I used pretty typical code copied from an example: Dim MailMsg As New MailMessageMailMsg.To = "xxx@verizon.net"MailMsg.Subject = TextBoxSubject.TextMailMsg.Body = TextBoxMessageText.TextMailMsg.From = TextBoxAddr.TextSmtpMail.SmtpServer = "localhost"SmtpMail.SmtpServer = "outgoing.verizon.net"SmtpMail.Send(MailMsg)I am on a home PC, with DSL provider Verizon.  Outlook is working for me to send/receive mail.When i tried SmtpMail.SmtpServer= "localhost", i got the following exception:The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to ...

Error message when I try to send an email
I'm getting this error message when I try to send an email: ---------------------------------------------------------------------- The "SendUsing" configuration value is invalid. 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.Runtime.InteropServices.COMException: The "SendUsing" configuration value is invalid. Source Error: Line 48: Line 49: SmtpMail.Send(txtFrom.Te...

Trying to send an email from a web form #2
I'm trying to send an email from a web form:  MailMessage Msg = new MailMessage(); Msg.To.Add(new MailAddress(ToPerson));Msg.From = new MailAddress(FromPerson); Msg.Subject = Subject; Msg.Body = BodyText;Msg.BodyEncoding = System.Text.Encoding.UTF8; Msg.SubjectEncoding = System.Text.Encoding.UTF8;Msg.Attachments.Add(new Attachment(FileName)); SmtpClient Client = new SmtpClient("127.0.0.1");Client.Send(Msg); I get  the exceptions: Unable to send email Unable to connect to remote server  What should I be specifying as the remote server for the smtp c...

Send email error from my web form question
I keep getting this fatal error when I try to send email from my web form internally.  For some reason, when I set the (to) address to a valid email address that is external it works, but when I try sending a valid email internally it will not work.  I even broke the mail function down to the bare minimum to send a sample email.  I even hard coded the addresses right in the (to) and (from) fields.  No matter what I try, it produces the same results.  If I change the (to) email address to anything external, it will work perfectl...

error trying to create web form from visual studio.net
I get the following message when I try to create a web form from visual studio. Visual Studio.NET has detected that the specified web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET web applications or services. I downloaded and installed ASP.NET version 1.1. Why am I getting this message? Thanks, Keith Stallings Try running aspnet_regiis -i from the .Net Framework's bin directory to see if it corrects the problem....

Sending Email with Net.Mail (No Email, no error)
hi,i'm using the system.net.Mail namespace to send an email from my application. when i send, the application does not fire any exception, neither does it send the email to my account.below is the code i'm using  Dim mmailMessage As New Net.Mail.MailMessage Dim mFrom As New Net.Mail.MailAddress(mailFrom) mmailMessage.From = mFrom Dim ll As String = "myname@ourmail.com" mmailMessage.To.Add(ll) mmailMessage.Subject = "Talk Concerns" mmailMessage.Body = "Testing Concerns One Two" Dim ...

Sending Email from web page-send.objmm error
when icomile the code th folowing error come .I have downloaded the code from http://www.4guysfromrolla.com/webtech/080801-1.shtml .and run it but it give me followin error . ****************************************************** The "SendUsing" configuration value is invalid. 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.Runtime.InteropServices.COMException: The "SendUsing" configuration value is in...

Submitting Web forms fields to sql database by clicking on SUBMIT FORM and sending the form fields to email box
I have a created or designed a form to be stored in a SQL database table and at the same time when a user clicks on SUBMIT button the form fields will automatically goto the visitor email address immediately. Also i have created a database with tables for each of this forms Pls help i have over 10 forms designed but the problem of submitting them to the table database and the user email address is the challenge now.... You ned to familiarise yourself with the basics of database access in ASP.NET.  There are free tutuorials here: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/da...

What does this error message mean? (I get it when trying to send a message that has embedded graphics)
How am I supposed to check the temp settings, and what am I supposed to change? "Sending of message failed. Unable to open the temporary file C:\Users\Storm\AppData\Local\Temp\nsmail.tmp. Check your 'Temporary Directory' setting." Restorm wrote: > How am I supposed to check the temp settings, and what am I supposed to > change? "Sending of message failed. > Unable to open the temporary file > C:\Users\Storm\AppData\Local\Temp\nsmail.tmp. Check your 'Temporary > Directory' setting." This poster to the m'zine forum investiga...

C# email form doesn't send email, but no compilation errors
I'm trying to get an email form to work.  It is a feedback form.  I wrote it in C#. The existing code returns no compilation errors and appears to work, but the email never gets delivered.  Is there something simple I'm forgetting about?  The email is a godaddy account.  I'm not sure if that has anything to do with it, but godaddy didn't help me at all so now I'm at a loss on what to do next. <%@ Page Language="C#" Explicit="true" MasterPageFile="~/MasterPage.master" %><%@ Import NameSpace="System....

I can send email from my site, but I get an error when I try to send a cell phone TM.
From all that I can gather sending a TM is very much the same as sending an email. Only thing that changes is who it is being emailed to. That being said however I keep getting this error: Mailbox unavailable. The server response was: <'left out for security reasons'@vtext.com> No such user here at System.Net.Mail.Smtp  Any one know why?? chekmate:Any one know why?? Yep.  The account you tried to email to doesn't exist at the server you tried to send it to.  You got the wrong account, the wrong server or both. JeffPlease: Don't forget to click &...

Sending Email through System.Net.Mail is generating errors "Failure Sending mail
hi Sending Email through System.Web.Mail is working fine but System.Net.Mail is generating errors "Failure Sending mail  i treid in all possible ways but did't  pls help in giving a solution thanks & Regards vittal Maybe you can show us some code and post the exact error mesg as well (by looking at the value in ex.tostring)?My HomePage - www.findingsteve.net"It is more blessed to give than to receive." Acts 20: 35 (NIV, Bible)Progress - "Never discourage anyone...who continually makes progress, no matter how slow." Plato System.Web.Ma...

Error Sending Email from .NET
Hey there.Ive made a signup script that authenticates users email by sending an activation code to their email address. The problem im getting is the following...The server rejected one or more recipient addresses. The server response was: 503 This mail server requires authentication. Please check your mail client settings. Now Ive been told this can be sorted via settings on the server but Ive emailed my hosting providers and they cant/wont change these settings... so is there any way I can get around this from within ASP.NETI would really appreciate any and all suggestions. Many Regards ...

Web resources about - Error trying to send email - CDO.Message - asp.net.web-forms

Message - Wikipedia, the free encyclopedia
A message is a discrete unit of communication intended by the source for consumption by some recipient or group of recipients. A message may ...

Catholic school strike: Out-of-office message out of order
Catholic teachers banned from making statement in email reply.

Catholic school strike: Out-of-office message out of order
Catholic teachers banned from making statement in email reply.

Trudeau's World Economic Forum Message: Canada's Open For Business 181
The PM also pointed to the success of a Canadian university.

5 Annoying Direct Messages on Twitter
When was the last time you checked your Direct Message inbox on Twitter, and actually found an important, worthwhile, or interesting message? ...

You have a Jack lets you decide when messages can be opened
You know the anticipation of waiting to open holiday gifts? You see them tagged with your name and wonder what is inside. It can be very exciting, ...

French dating app Happn's 10 million users can now send each other intimate voice messages
Mobile dating app Happn has introduced a feature that allows people to send voice messages to their crushes. The feature, which is likely to ...

Minn. cop on leave over message on Black Lives Matter
Social media message alleged to be from St. Paul cop about protesters tells public to "run them over"

The market's economic message
Should you listen to the message that stocks appear to be sending about the state of the economy, or not?

Whose Message Is More Effective Among Dems — Hillary Or Bernie? No Doubt: Hillary
Whose Message Is More Effective Among Dems — Hillary Or Bernie?

Resources last updated: 1/21/2016 10:11:51 AM