PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Sending email with large message in html format
Sending email with large message in html format
Débuté par Frans, 21 nov. 2004 21:07 - 16 réponses
Posté le 21 novembre 2004 - 21:07
Hello to you al,
I have made a little program for sending email and have a few problems:
My lines are as follows:
EmailID is int
EmailID = EmailStartSession("TSE","ok")
Email.NbRecipient = 1
Email.Recipient[1] = F_klant.mail // field of file. this works fine
Email.NbAttach = 1
Email.message="c:\textfile_with_message.html" // this is a problem!!
Email.Attach="c:\uitlever\V322\SETUP_V12.EXE" // this works fine
Email.Subject="This is the subject" // this works fine
EmailSendMessage(EmailID)
The problem is that I don't know how to fill the email.message with a html file or is there another way. I tried to use email.html but this also seems not to point to the file on disk but is seen as text.
I tried something like {"c:\textfile.txt"} no effect.
There is emailstructure list in the helpfile but no help on the displayed items.
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 21 novembre 2004 - 21:18
Hi Frans,
Email.message=fLoadText("c:\textfile_with_message.html")
is this what you want?
Hello to you al,
I have made a little program for sending email and have a few problems:
My lines are as follows:
EmailID is int
EmailID = EmailStartSession("TSE","ok")
Email.NbRecipient = 1
Email.Recipient[1] = F_klant.mail // field of file. this works fine
Email.NbAttach = 1
Email.message="c:\textfile_with_message.html" // this is a problem!!
Email.Attach="c:\uitlever\V322\SETUP_V12.EXE" // this works fine
Email.Subject="This is the subject" // this works fine
EmailSendMessage(EmailID)
The problem is that I don't know how to fill the email.message with a html file or is there another way. I tried to use email.html but this also seems not to point to the file on disk but is seen as text.
I tried something like {"c:\textfile.txt"} no effect.
There is emailstructure list in the helpfile but no help on the displayed items.
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans



http://www.invitec.com
Posté le 21 novembre 2004 - 21:28
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 21 novembre 2004 - 23:02
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans



http://www.invitec.com
Posté le 21 novembre 2004 - 23:07
Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 22 novembre 2004 - 03:05
Helle Frans,
What Raimund suggested should work.
htmltext is string
htmltext = fLoadText("c:\any.html")
email.html = htmltext
I tried it & it worked.
Don

Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 22 novembre 2004 - 21:32
Hello Raimund and Don,
Thank you for your answers.
Its nice that it works for you Don but I can't get it work. There is no text in the message.
It works with txt but not with email.html.
Regards Frans
Helle Frans,
What Raimund suggested should work.
htmltext is string
htmltext = fLoadText("c:\any.html")
email.html = htmltext
I tried it & it worked.
Don

Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 23 novembre 2004 - 00:53
Hi Frans,
Have you checked your email program and have it set to read html messages?
Just a thought.
Bert
Hello Raimund and Don,
Thank you for your answers.
Its nice that it works for you Don but I can't get it work. There is no text in the message.
It works with txt but not with email.html.
Regards Frans
Helle Frans,
What Raimund suggested should work.
htmltext is string
htmltext = fLoadText("c:\any.html")
email.html = htmltext
I tried it & it worked.
Don

Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 23 novembre 2004 - 00:56
Hi Frans
iPreview(HTML, Reportname)
Makes the file from a report
then
User is string = NoSpace(EmailInfo.UserName)
Password is string = NoSpace(EmailInfo.Password)
POP3Name is string = NoSpace(EmailInfo.Mail_Server)
SMTPName is string = NoSpace(EmailInfo.SMPT_Server)
Text is string = fLoadText("ClientConfirmation.HTM")
UserName is string
Recipient is string
Subject is string = "Booking Confirmation"
Sender is string = NoSpace(EmailInfo.Return_Address)
makes the email,
then I also attach the report as an HTML in case the client doesn't have HTML email.
That way it goes both ways
Gill
Hello Raimund and Don,
Thank you for your answers.
Its nice that it works for you Don but I can't get it work. There is no text in the message.
It works with txt but not with email.html.
Regards Frans
Helle Frans,
What Raimund suggested should work.
htmltext is string
htmltext = fLoadText("c:\any.html")
email.html = htmltext
I tried it & it worked.
Don

Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 23 novembre 2004 - 11:19
Frans, I have been busy with that emailing stuff for a long long time....To me it looks you don't have a windev problem but a problem with your email client (Outlook, etc...). I see you use Outlook Express (which should work with using a profile for connecting but doesn't). Well, i did have a bunch of problems with that client. Use Microsoft Outlook, that handles it in another way.

So: Send a html email with your outlook express first to e.g. a hotmail account and see how it looks like. Then send one to your own. If that already works fine, your client looks ok.

Still problems, have a look at my site www.bacey.com and move to E@Mkt. Download the exe (windev 7.5), enter your connection settings, enter a customer and contacts and send some email to it. There's a screen which allows you to import html...
Posté le 23 novembre 2004 - 11:35
Frans, I just submitted an answer on the official pcsoft windev.us forum.
It seems they copïed this stuff...grrrrrrrrrrr....

http://www.bacey.com
Posté le 24 novembre 2004 - 21:47
Hi Gill,
Thanks for your answer.
I tried your solution; only I don't know the word Emailinfo. I use Windev 8 and you?
Regards Frans.
Hi Frans
iPreview(HTML, Reportname)
Makes the file from a report
then
User is string = NoSpace(EmailInfo.UserName)
Password is string = NoSpace(EmailInfo.Password)
POP3Name is string = NoSpace(EmailInfo.Mail_Server)
SMTPName is string = NoSpace(EmailInfo.SMPT_Server)
Text is string = fLoadText("ClientConfirmation.HTM")
UserName is string
Recipient is string
Subject is string = "Booking Confirmation"
Sender is string = NoSpace(EmailInfo.Return_Address)
makes the email,
then I also attach the report as an HTML in case the client doesn't have HTML email.
That way it goes both ways
Gill
Hello Raimund and Don,
Thank you for your answers.
Its nice that it works for you Don but I can't get it work. There is no text in the message.
It works with txt but not with email.html.
Regards Frans
Helle Frans,
What Raimund suggested should work.
htmltext is string
htmltext = fLoadText("c:\any.html")
email.html = htmltext
I tried it & it worked.
Don

Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 24 novembre 2004 - 21:50
Hi Bert,
Thank you for your answer.
I have double checked it. It can read html.
Regards Frans.
Hi Frans,
Have you checked your email program and have it set to read html messages?
Just a thought.
Bert
Hello Raimund and Don,
Thank you for your answers.
Its nice that it works for you Don but I can't get it work. There is no text in the message.
It works with txt but not with email.html.
Regards Frans
Helle Frans,
What Raimund suggested should work.
htmltext is string
htmltext = fLoadText("c:\any.html")
email.html = htmltext
I tried it & it worked.
Don

Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 24 novembre 2004 - 21:54
I think that they take what they need and hope that they do something usefull with it. Perhaps they can help us anwering our questions.
Don't be angry. It won't help you.
Regards Frans.
>
Frans, I just submitted an answer on the official pcsoft windev.us forum.
It seems they copïed this stuff...grrrrrrrrrrr....
Posté le 25 novembre 2004 - 00:05
Hi Frans,
Emailinfo is the file name of the file I use to keep the senders mail information, user, mail server, password. I pass these into variables for transfer to the procedure that actually sends the mail using the WD8 mail system.
So to send the email:
IF EmailStartSMTPSession(User, SMTPName) = True THEN
UserName = User
ELSE
UserName = ""
Error("Unable to connect")
END

// Initialize the mail components
Email.Sender = Sender // Sender
Email.Recipient[1] = Recipient // Recipient
Email.NbRecipient = 1 // Number of recipients
Email.Subject = Subject // Topic
Email.HTML = Text //Message text
Email.NbAttach = 1 // Number of attachments
Email.Attach = "ClientConfirmation.HTM"

// Send the mail
IF NOT EmailSendMessage(UserName) THEN
Error(EmailMsgError(Email.Error))
ELSE
NextTitle("Email Sent")
Info("Confirmation Email Sent")
END
...
EmailCloseSession(UserName)
ELSE
NextTitle("Problem")
Info("Recipient Email address not found", "Cancelling Email")
END
Gill
Hi Gill,
Thanks for your answer.
I tried your solution; only I don't know the word Emailinfo. I use Windev 8 and you?
Regards Frans.
Hi Frans
iPreview(HTML, Reportname)
Makes the file from a report
then
User is string = NoSpace(EmailInfo.UserName)
Password is string = NoSpace(EmailInfo.Password)
POP3Name is string = NoSpace(EmailInfo.Mail_Server)
SMTPName is string = NoSpace(EmailInfo.SMPT_Server)
Text is string = fLoadText("ClientConfirmation.HTM")
UserName is string
Recipient is string
Subject is string = "Booking Confirmation"
Sender is string = NoSpace(EmailInfo.Return_Address)
makes the email,
then I also attach the report as an HTML in case the client doesn't have HTML email.
That way it goes both ways
Gill
Hello Raimund and Don,
Thank you for your answers.
Its nice that it works for you Don but I can't get it work. There is no text in the message.
It works with txt but not with email.html.
Regards Frans
Helle Frans,
What Raimund suggested should work.
htmltext is string
htmltext = fLoadText("c:\any.html")
email.html = htmltext
I tried it & it worked.
Don

Hi raimund,
I tried email.html but then nothing is in the email body. Also I tried the rtfload. Doesn't work
But thank for the tip.
Regards Frans
Hi Frans,
try email.html = fLoadText(..)
HTH
Raimund
Thanks for your superfast answer.
It fills the message but it doesn't give the colors underline etc. It gives the html code.
What to do?
Regards frans
Second: I get a message that Outlook Express couldn't handle the request but all works fine. The message and the attachment are in the outbox??
Somebody know the solution?
Regards Frans
Posté le 13 décembre 2004 - 11:34
Nah Frans, They would help us (PC Soft) if they would set up a real good forum where e.g. your answers are immediately displayed.
For a company promoting WebDev they could set up a real nice forum (or can't they using WebDev ?)
I think that they take what they need and hope that they do something usefull with it. Perhaps they can help us anwering our questions.
Don't be angry. It won't help you.
Regards Frans.

Frans, I just submitted an answer on the official pcsoft windev.us forum.

It seems they copïed this stuff...grrrrrrrrrrr....
Posté le 13 décembre 2004 - 11:51
Indeed,
Nice idea.
This would be a good demonstration of a webdev application for everybody nad a real help for us.
Regards Frans.
>
Nah Frans, They would help us (PC Soft) if they would set up a real good forum where e.g. your answers are immediately displayed.
For a company promoting WebDev they could set up a real nice forum (or can't they using WebDev ?)
I think that they take what they need and hope that they do something usefull with it. Perhaps they can help us anwering our questions.
Don't be angry. It won't help you.
Regards Frans.

Frans, I just submitted an answer on the official pcsoft windev.us forum.

It seems they copïed this stuff...grrrrrrrrrrr....