473,473 Members | 4,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

send email using c# without using CDONTS

dear sirs
i want to send email using c#
but i don`t want to use CDONTS
or tell me how can i use it
i don`t know any thing about CDONTS

thanks
Nov 16 '05 #1
11 6499
see other post on this about 1-2 days ago....

--
William Stacey, MVP

"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in
message news:fe****************************@phx.gbl...
dear sirs
i want to send email using c#
but i don`t want to use CDONTS
or tell me how can i use it
i don`t know any thing about CDONTS

thanks


Nov 16 '05 #2
The old messages re the subject are unavailable.

I used this routine. Works ok. There is a limit on size. Depends on OS.

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;

namespace TeleM
{

public class Email:Form
{
private string e_address;
private string subject;
private string body;

public Email(string e_address, string subject, string body)
{
this.e_address=e_address;
this.subject=subject;
this.body=body;
do_mail();
}
private void do_mail()
{
try
{
string message = string.Format( "mailto:{0}?subject={1}&body={2}",
e_address, subject, body );
Process.Start( message );
}
catch
{
MessageBox.Show("Message is too
big.","Error",MessageBoxButtons.OK,MessageBoxIcon. Warning);
}
}
}
}

"William Stacey [MVP]" <st***********@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
see other post on this about 1-2 days ago....

--
William Stacey, MVP

"Mohammed Abdel-Razzak" <an*******@discussions.microsoft.com> wrote in
message news:fe****************************@phx.gbl...
dear sirs
i want to send email using c#
but i don`t want to use CDONTS
or tell me how can i use it
i don`t know any thing about CDONTS

thanks

Nov 16 '05 #3
> string message = string.Format( "mailto:{0}?subject={1}&body={2}",

the Internet Explorer mailto protocol has some serious drawback. the URL
size cannot exceed 2kb. so this is useless in general.

what I suggest is to search for the implementation of sending mail via SMTP.
it's fast and reliable.

Regards,
Wiktor Zychla
Nov 16 '05 #4

"Wiktor Zychla" <us**@nospam.com.eu> wrote in message
news:u%****************@TK2MSFTNGP12.phx.gbl...
string message = string.Format( "mailto:{0}?subject={1}&body={2}",
the Internet Explorer mailto protocol has some serious drawback. the URL
size cannot exceed 2kb. so this is useless in general.


Not so for general use.

what I suggest is to search for the implementation of sending mail via SMTP. it's fast and reliable.


Please give some references.

Patrick.
Nov 16 '05 #5
"Patrick de Ridder" <wa********@all.here> wrote in news:c0e8f$40af53a4
$3*************@freeler.nl:
what I suggest is to search for the implementation of sending mail via

SMTP.
it's fast and reliable.


Please give some references.


http://www.codeproject.com/useritems/IndySMTP.asp
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Make your ASP.NET applications run faster
http://www.atozed.com/IntraWeb/
Nov 16 '05 #6
Thanks,
Patrick.

"Chad Z. Hower aka Kudzu" <cp**@hower.org> wrote in message
news:Xn******************@127.0.0.1...
"Patrick de Ridder" <wa********@all.here> wrote in news:c0e8f$40af53a4
$3*************@freeler.nl:
what I suggest is to search for the implementation of sending mail via

SMTP.
it's fast and reliable.


Please give some references.


http://www.codeproject.com/useritems/IndySMTP.asp
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Make your ASP.NET applications run faster
http://www.atozed.com/IntraWeb/

Nov 16 '05 #7
> "Chad Z. Hower aka Kudzu" <cp**@hower.org> wrote in message
news:Xn******************@127.0.0.1...
"Patrick de Ridder" <wa********@all.here> wrote in news:c0e8f$40af53a4
$3*************@freeler.nl:
> what I suggest is to search for the implementation of sending mail via SMTP.
> it's fast and reliable.

Please give some references.


http://www.codeproject.com/useritems/IndySMTP.asp


When I set up the email program I get this error message:

The requested name is valid and was found in the database,
but it doesn't have the correct data being resolved for.

This error occurs in Form1

at this line:

LSMTP.Send(LMsg);

The bottom text area in Form1 says:
Resolving hostname smtp.xxxxx.yy

Please assist.

Patrick.
Nov 16 '05 #8
psg
"Patrick de Ridder" <wa********@all.here> wrote in message
news:10***************************@freeler.nl...
The requested name is valid and was found in the database,
but it doesn't have the correct data being resolved for.
AFAIK this problem has sth to do with DNS.
Resolving hostname smtp.xxxxx.yy


Have you checked if smtp.xxxxx.yy exists?
Statrt->Run:
ping smtp.xxxxx.yy
telnet smtp.xxxxx.yy 25

RGDS PSG
Nov 16 '05 #9
Yes, it exists. The app. runs ok if the connection is already established,
but not if it isn't.
"psg" <pg******@ki.net.pl> wrote in message
news:c8**********@b177.ki.net.pl...
"Patrick de Ridder" <wa********@all.here> wrote in message
news:10***************************@freeler.nl...
The requested name is valid and was found in the database,
but it doesn't have the correct data being resolved for.


AFAIK this problem has sth to do with DNS.
Resolving hostname smtp.xxxxx.yy


Have you checked if smtp.xxxxx.yy exists?
Statrt->Run:
ping smtp.xxxxx.yy
telnet smtp.xxxxx.yy 25

RGDS PSG

Nov 16 '05 #10
psg
"Patrick de Ridder" <wa********@all.here> wrote in message
news:18***************************@freeler.nl...
Yes, it exists. The app. runs ok if the connection is already established,
but not if it isn't.


You mean connection with your server in SMTP protocol, or connection with
the Internet?
Most probably it is connection with the Internet that is not established at
the moment of error. Address smtp.xxxxx.yy must be translated to IP with
help of DNS server, if DNS is not available then name query will rise an
error mentioned before. I suggest you to simply catch this exception and
inform user about it in more understandable way. You may also think about
trying to establish a connection, but that is a different issue.

RGDS PSG
Nov 16 '05 #11
When I run the program on a W98 machine, there is no problem at all.
I get the error on a XP machine.
There is no problem if I am already connected to the internet.
An email client previously working ok with smtp now produces socket error
#11004.
Do you have any further suggestions?
Patrick.

"psg" <pg******@ki.net.pl> wrote in message
news:c8**********@b177.ki.net.pl...
"Patrick de Ridder" <wa********@all.here> wrote in message
news:18***************************@freeler.nl...
Yes, it exists. The app. runs ok if the connection is already established, but not if it isn't.
You mean connection with your server in SMTP protocol, or connection with
the Internet?
Most probably it is connection with the Internet that is not established

at the moment of error. Address smtp.xxxxx.yy must be translated to IP with
help of DNS server, if DNS is not available then name query will rise an
error mentioned before. I suggest you to simply catch this exception and
inform user about it in more understandable way. You may also think about
trying to establish a connection, but that is a different issue.

RGDS PSG


Nov 16 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: | last post by:
I did a working code with CDONTS on NT4 Now I am testing is on w2k and it looks like objCDONTS.Send is completely ignored. I think is it ignored because it throws no errors, neither does the...
7
by: Mario Leduc | last post by:
Hi, I have a page that sends user comments with CDONTS, works fine. Until I put a URL (http://192.168.0.1). If I use http://domain.com it works fine. Why with the numeric URL, CDONTS does not...
2
by: Jammer | last post by:
Can someone give me some sample code to use CDONTS.new to send email with an attachment? I've got sample code from the following website; ...
2
by: Marty | last post by:
ASP.Net, C#, Email message, CDonts not CDO I am writing an ASP.Net application where I cannot use CDO. I must use CDonts. I cannot find an example of this on the Internet. I only see examples...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
2
by: microsoft.public.dotnet.languages.csharp | last post by:
ASP.Net, C#, Email message, CDonts not CDO I am writing an ASP.Net application where I cannot use CDO. I must use CDonts. I cannot find an example of this on the Internet. I only see examples...
2
by: Paul Turley | last post by:
How do I format a message so it shows up as a web page in the mail reader. In the body of my message, I'm including a '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Traditional//EN">' tag and...
5
by: Andreas | last post by:
I am working with three computers, my developing computer, a Web Server and a Mail Server (Exchange). I am trying to send a email from the Web Server via the Mail Server to a valid email address...
7
by: Ron Hinds | last post by:
Our webserver is currently Windows 2000 Server. Many of our pages send mail using the CDONTS object library. It is simple and very straightforward. We have built a new webserver using Windows...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.