Prev: Recommendations for linkable report writer
Next: bBrowser and getting a value to set a filter with
From: Johan Nel on 25 Oct 2009 04:40 Geoff, Here is a very simple Vulcan example using the .NET classes, but I am sure you would be able to convert to the VO classes or otherwise be able to embed it in VO. Regards, Johan Nel Pretoria, South Africa. Geoff Chambers wrote: > I'm looking for some simple code that would read some data from a > table and then send me and email. The email sample was more than what > I was looking for. I don't need any GUI interface, just something > simple that would send an email without user interaction. CLASS MailSender PROTECT smtpHost AS STRING CONSTRUCTOR() SELF:smtpHost := "127.0.0.1" RETURN METHOD SendMailMessage(sender AS MailAddress, ; recipient AS STRING, ; subject AS STRING, ; message AS STRING) AS LOGIC LOCAL mailMsg AS MailMessage LOCAL count AS INT LOCAL oSmtp AS SmtpClient LOCAL result AS STRING[] LOCAL lSuccess AS LOGIC TRY mailMsg := MailMessage{} result := recipient:Split(",;":ToCharArray(), ; StringSplitOptions.RemoveEmptyEntries) FOR count := 0 UPTO result:Length - 1 mailMsg:@@To:Add(MailAddress{result[count]}) NEXT mailMsg:From := sender mailMsg:Subject := subject mailMsg:Body := message mailMsg:BodyEncoding := Encoding.ASCII mailMsg:Priority := MailPriority.Normal oSmtp := SmtpClient{smtpHost} oSmtp:Send(mailMsg) lSuccess := TRUE CATCH oEx AS Exception lSuccess := FALSE END TRY RETURN lSuccess
From: richard.townsendrose on 25 Oct 2009 06:27 Phil well there is a commnet denis lucas 2004 ... anyway this is exactly the code i was looking fro for sending html mails ... i guess the constructor will work with anything .... richard
From: Marc Verkade [Marti IT] on 25 Oct 2009 08:17 Plz let me know if you got it working! -- Grtz, Marc "richard.townsendrose" <richard.townsendrose(a)googlemail.com> schreef in bericht news:3c987f60-3ef1-4812-87af-2f459260daf9(a)d4g2000vbm.googlegroups.com... > Phil > > well there is a commnet denis lucas 2004 ... > > anyway this is exactly the code i was looking fro for sending html > mails ... > > i guess the constructor will work with anything .... > > richard
From: Geoff Schaller on 25 Oct 2009 17:20 Geoff, What's wrong with the email client presented? It has all the code you need. All you do is go to the SendEmail method on the window. What does a GUI do except take values from controls? Just replace this with reads from the database. Equally, you have all my classes. Just look into Class - Email Object module of 2 GCS GUI. Everything you could possibly want is in there, whether it be internal classes or Phil's way or Outlook. There you have a completely OO class to manage the construction and transmission of an email from GUI-less code. Geoff "Geoff Chambers" <gchambers02(a)msn.com> wrote in message news:33cb4326-d8fe-4664-b7c6-22764d59a66d(a)d4g2000vbm.googlegroups.com: > I'm looking for some simple code that would read some data from a > table and then send me and email. The email sample was more than what > I was looking for. I don't need any GUI interface, just something > simple that would send an email without user interaction.
From: richard.townsendrose on 27 Oct 2009 05:49 Marc will do - will be a few days / maybe a week - amd working on seo'ing the new tdoc support web site at www.tdocplus.co.uk i am alos going to put in barbara's code for generating pdf's via ghostscript - so it is in effect "native" to tdoc = no need for pdf995 or bullpdf or whatever. joomla makes it so easy to do - but lot of tedious work on doing titles and keywords ... richard
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Recommendations for linkable report writer Next: bBrowser and getting a value to set a filter with |