|
 |
|
|
We need to send 1000s of legitimate order confirmation emails because of our business (we sell DVDs).
Does anyone know how to use the Microsoft dot-net components to do this?
We need to: Connect Send Send Send ... Disconnect
Or does anyone know of a 3rd party component that does this?
IP*Works! does this BUT it's way too expensive and we only need this one component of their suite.
Pete MovieMars.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi, for those people getting 451 errors when posting to SMTP then the solution is usually to ensure you are not sending cr's or lf's on their own as these are disallowed in emails.
In vb.net a simple
Body = Body.Replace(vbCr,"").Replace(vbLf,"")
Should sort your problem out for you (at least it did for me!)
Happy emailing
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
If you are using authentication the code will not work. You must set sendusing and smtpauthenticate to the same thing:
message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 1); message.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", 1);
Depending on what you're using, set them to the follwing:
cdoAnonymous - 0 - Perform no authentication. cdoBasic - 1 - Use the basic (clear text) authentication mechanism. cdoNTLM - 2 - Use the NTLM authentication mechanism.
Brother C
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
hello,
i need help please..
i created an asp.net c# code to send email. the TO Address is constant as it put in the code, so i want this field to be variable( users input it).another problem with attatchment, it did not work with me i tried my best but no luck, so help me plz
this is a code:
<% @Page Language="C#" %> <% @Import Namespace="System" %> <% @Import Namespace="System.Web.Mail" %>
<html> <head> <meta http-equiv="Content-Language" content="en-us" /> </head> <body> <input id="txtTo" type="text" value="aaa@hotmail.com" runat="server" /> > <input id="txtFrom" type="text" value="aaa@fashionsecret.net" runat="server" />
<input id="txtSubject" type="text" value= "Test Email" runat="server" />
<textarea id="txtBody" value= "Test Email Body" runat="server"></textarea>
<input type="submit" value="Send Message" name="send" />
An email has been sent to: aaa@hotmail.com, please check your email.
</body> </html>
<% MailMessage oMsg = new MailMessage(); oMsg.From=txtFrom.Value; oMsg.To = txtTo.Value; oMsg.Cc = "aaa@yahoo.com"; oMsg.Bcc = "aaa@gmail.com"; oMsg.Subject = txtSubject.Value; oMsg.Body = "Hello World!"; MailAttachment attachment = new MailAttachment("c:\t.txt"); oMsg.Attachments.Add(attachment); %>
<%SmtpMail.Send(oMsg); oMsg = null; %>
i am waiting to ur reply
Regards,,,
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
private int SendMail2(string mailTo, string mailFrom,string htmlBody,string stripAdd,string UserName, string Pwd) { MailMessage mail = new MailMessage(); mail.To = mailTo; mail.From = mailFrom; mail.Subject = "this is an authenticated test email using System.Web.Mail."; mail.Body = "Some text goes here"; mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = stripAdd; mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"]= 25; mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"]= 2; mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"]=1;//basic authentication mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"]= UserName; //set your username here mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"]= Pwd; //set your pwd SmtpMail.SmtpServer = stripAdd; //your real server goes here SmtpMail.Send( mail ); return 1; }
MY Above mentioned code does not.... work... i am using and external mail server....... Please help me out.. MY Exception Reads Like:
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server. --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Type type, Object obj, String methodName, Object[] args) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at TestMailApp.WebForm1.SendMail2(String mailTo, String mailFrom, String htmlBody, String stripAdd, String UserName, String Pwd) in c:\inetpub\wwwroot\testmailapp\webform1.aspx.cs:line 80 at TestMailApp.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\testmailapp\webform1.aspx.cs:line 28
N!ls 
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
You dont by chance have Virus Scan do you? The latest version has an outgoing email msg blocker that blocks any application not in its safe list from sending out on port 25. Check the Access Protection settings (from Virus Scan Console).
|
| Sign In·View Thread·PermaLink | 3.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
--http://schemas.microsoft.com/cdo/configuration/-- http://msdn.microsoft.com/library/en-us/cdosys/html/37be0471-06bd-489d-8bf2-5c22bb7ce17c.asp
--Enumerated Values-- http://msdn.microsoft.com/library/en-us/cdosys/html/c8834714-3144-4fec-808a-112aa1257b08.asp
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
I used this in C++ and it works fine if the server doesn't have autentication. If it has there's an error, the same as if i don't use the authentication part. Does the Fields proterty have to be menaged diferently in C++?? Thanks Adriano
|
| Sign In·View Thread·PermaLink | 1.50/5 (2 votes) |
|
|
|
 |
|
|
 |
|
|
i m facing below error please give me solution
Server Error in '/Email' Application. --------------------------------------------------------------------------------
The message could not be sent to the SMTP server. The transport error code was 0x800ccc6a. The server response was 451 Requested action aborted: error in processing
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Unable to send mail using an external SMTP server with CDOSYS. Configuration settings are as follows:
cdoSendUsingMethod = cdoSendUsingPort cdoSMTPServer = "my smtp server name" cdoSMTPServerPort = 25 cdoSMTPAuthenticate = cdoBasic cdoSendUserName = "my user name" cdoSendPassword = "my password"
The local SMTP service seems to pick up the mail instead of the external smtp server specified. The mail sits in the local SMTP service's pickup folder if the service is stopped.
Could anyone please help me send a mail using the external SMTP server irrespective of the presence of the local SMTP service.
NOTE: I have Outlook Express and IIS SMTP service installed on the system
Thanks, Ramesh
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |
|
|
 |
|
|
anyone who have managed to solve the problem of sending mails using externam smtp server through the damn CDOSYS.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
the actual error i get is outlined below -
System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server
this damn thing has been working fine, suddenly is giving me this funny error - anyone who has an idea.
|
| Sign In·View Thread·PermaLink | 2.67/5 (3 votes) |
|
|
|
 |
|
|
I can't get this code to work over my company network. I am trying to send an e-mail from a web-service using my own company e-mail account. I get an exception with the explanation 'The transport failed to connect to the server'.
The C# code is below. Can anyone explain why this is failing? Thanks.
SmtpMail.SmtpServer = "MyCompanySMTPserver"; try { MailMessage msg = new MailMessage(); msg.To = "to_email@mycompany.com"; msg.From = "my_email@mycompany.com"; msg.Subject = "test mail"; msg.Body = "This msg was sent by SMTPMail"; msg.BodyFormat = MailFormat.Text;
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "mycompanySMTPserver"); msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport",25); msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing",2); //2 to send using SMTP over the network msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",1); //1 = basic authentication msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "mySMTPusername"); msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "mySMTPpassword");
SmtpMail.Send(msg); } catch(Exception ex) { string s = ex.ToString(); }
================================================ ZipScan: Search Zip, CAB and other archive files http://www.foobarsoftware.com/
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I just sorted this out for myself - I was using the external network name of the SMTP server (e.g. smtp.mycompany.com) instead of the local network name. Using the local name makes it work perfectly.
================================================ ZipScan: Search Zip, CAB and other archive files http://www.foobarsoftware.com/
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I cannot set the Fields as I've got an error message "(103): 'System.Web.Mail.MailMessage' does not contain a definition for 'Fields'" Am I doing sth wrong so I've got this result? Thanks for answering
Tim
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Which version of .NET framework have got installed? I believe the Fields stuff is only implemented in version 1.1
================================================ ZipScan: Search Zip, CAB and other archive files http://www.foobarsoftware.com/
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Thanks Adrain,
I am using version 1.1 (1.1.4322) Can I use the Fields stuff?
If not, is there any way for me to do SMTP Authentication with the System.Web.Mail? 
I am an idoit in programming so I didn't understand how to do these things with simply TCP/IP transport. Therefore, I used .Net to do.
Tim
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |