If you can use the .Net 2.0 framework (either through COM interop or the 
etecnologia extender), the System.Net.Mail namespace has got all you need. A 
simple example:

SmtpClient smtpClient = new SmtpClient("smtp.someserver.com");
smtpClient.Credentials = new NetworkCredential("username", "password");

MailMessage mail = new MailMessage(new MailAddress("[EMAIL PROTECTED]"), new 
MailAddress([EMAIL PROTECTED]));

mail.Body = myBodyString;
mail.IsBodyHtml = true; // or false
mail.Subject = "Subject goes here";
smtpClient.Send(mail);


Eyvind.

-----Opprinnelig melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av Whil Hentzen (Pro*)
Sendt: 5. april 2007 18:53
Til: [email protected]
Emne: Sending mail from VFP w/o mailto

Hi folks,

I have inherited (ahem...) an app that includes a rudimentary email 
function in one of its modules. It uses the 'mailto' and shellexecute 
functions in Windows, primarily because the app used to be x-plat and 
thus couldn't rely on Windows-only solutions.

The Windows part of the call looks like this:

m.mailcommand = "mailto:"; + m.realname + "<" + m.emailaddress + ">" + 
"?subject=" + m.subject + "&body=" + m.message

declare integer ShellExecute in shell32.dll...
declare integer FindWindow in WIN32API...
=ShellExecute(FindWindow(....))

It works fine for short messages (@1000 bytes), but now they want to 
send big ol' messages, like 10K to 20K. This current mechanism is 
truncating those messages (I think at 1024.)

My options are...

Door #1: Find a way to use the current mechanism but allow it to use 
much longer messages -> that's your first question.

Door #2: Find a different, Windows OS-only solution.

Door #3: Incorporate a third party utility such as BLAT (which I've seen 
talked about here oodles) or ipstuff.

It'd be great if I could just alter the syntax of the current mechanism 
to be able to include longer messages, but I don't know enough about how 
that works to determine if it's a native limit or something artificial 
imposed by this app.

Whil


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to