Page 1 of 2

Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 5:35 am
by dragancesu
HMG is excellent and it's hard to find something that should be added and it was interesting to all users

Looking at the other tools and their "print preview" many have the "sent by mail"

I do not know how hard it is to add but it would be useful

Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 11:50 am
by Pablo César
Nice idea Dragan.

I was looking examples for send by email in Print Preview and I saw this:
Screen1.png
Screen1.png (55.93 KiB) Viewed 11243 times
I found interesting options and way to export in "Save as" for our Print Preview, nice ones too.

I'm imagining this option for send by email, should be easier to execute file for sending by default email engine.
Otherwise will be necessary for configuring a database of Server/E-mail. :?

I do not know how is actually working all these of sending emails. Probably Maximiliano Daniel or anyone else could make any comments about. I'm very interested to know. :P

I know in Harbour soffered some modify, change an adding about hb_sendmail(...), ActivateSSL, DetectSecurity, gmail.prg :roll:

So IMHO it's much easier to let operating system to care sending email engine. For example to create EML or MHT text files formats containing duly standard file structure for this propose. You can read and watch video for some more info at: http://www.coolutils.com/formats/eml :idea:

Re: Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 12:18 pm
by Rathinagiri
Good Idea!

Re: Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 12:40 pm
by dragancesu
It was just an idea, what would facilitate the user to work with report

Look for example pdf reader, office: Word, Excel and other, they have send

This option open the default mail client and a file that can be sent as an attached attacment

Re: Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 1:05 pm
by mol
The main problem is that we can only generate pdf, csv, text and image files without using external applications (excel, openoffice calc).
But, we can create print preview interface which should have parameters which export is available to avoid runtime errors

Re: Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 2:59 pm
by serge_girard
Very good idea Dragan!

Serge

Re: Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 3:17 pm
by danielmaximiliano
Hola Pablo y otros :
creo que la funcion Print Preview necesita agregar un boton para envio de email enviando los datos con CdoSys en windows.
otra caracteristica esta especifica aqui : https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

tambien puede ser usar la funcion ShellExecute

Code: Select all

ShellExecute(NULL, "open", "mailto:opa@gmail.com", "", "", SW_SHOWNORMAL )
Translate Google


Hi Pablo and others:
I think the Print Preview function need to add a button to send us an email sending data with CdoSys in windows.
another feature is specified here: https://msdn.microsoft.com/en-us/librar ... 85%29.aspx

Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 3:40 pm
by Pablo César
Thank you Daniel for your prompt reply.

Seems very interesting what you said, but for me this is hard to understand.

You are the guy in this matter, I guess.

But this article is showing there differances between OS version ( MAPISendMailHelper / MAPISendMailW ) and also seems a solution in ANSI.
Screen1.png
Screen1.png (21.61 KiB) Viewed 11198 times
How about UNICODE ? Or this will be not concerned case for our last HMG version ?

So many questions... I'm really lost in this.

Will be wonderful to implement in HMG but we have to be sure how and what will be done in order to avoid any run time errors.

Most of cases, users does not know when his configuration is ready or not, configured or not to send emails by third engine system. This is my concern... :?

Re: Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 3:44 pm
by danielmaximiliano
Pablo _
MAPISendMail() does not support UTF-8, only Ansi. If you need to send Unicode data, you have to use MAPISendMailHelper() on Windows 7 and earlier, or MAPISendMailW() on Windows 8 and later. This is clearly stated in the MAPISendMail() documentation.

Print Preview - Button Send mail

Posted: Thu Mar 05, 2015 3:51 pm
by Pablo César
danielmaximiliano wrote:MAPISendMail() does not support UTF-8, only Ansi. If you need to send Unicode data, you have to use MAPISendMailHelper() on Windows 7 and earlier, or MAPISendMailW() on Windows 8 and later
So there is solution for UNICODE, for (Windows 7 + earlier) and for (Windows 8 + later). Too many ways... more implementations, do not ?
danielmaximiliano wrote:Can also be used the ShellExecute function as follows:

Code: Select all

ShellExecute(NULL, "open", "mailto:opa@gmail.com", "", "", SW_SHOWNORMAL )
Nice one ! (I saw later, in your re-edited message)

I think this is the best way for at moment, I do not know if the ideas will arise and ripen best options (safe and practices).

But note in your code, should it be ShellExecute(Nil, "open"... instead

Thanks Daniel,

But please, let's all keeping on... in this idea.