NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: johanco123 on June 09, 2014, 12:14:04 AM

Title: How can I Send email using Client own Outlook
Post by: johanco123 on June 09, 2014, 12:14:04 AM
Hi Bruce
How can I send email out of my web apps using the clients own Microsoft outlook. The client wants to use their own signatures and I must attached files to the the email address out of the web application after the report was generated in the web app.

Any Example that I can look at?

Regards
Johan
Title: Re: How can I Send email using Client own Outlook
Post by: Bruce on June 09, 2014, 12:59:12 AM
>> How can I send email out of my web apps using the clients own Microsoft outlook

you can't. And you don't want to.

You can't because the browser (which is all the software they have) cannot interact with other programs on the computer. You could install a software program on that client computer which acts as a link between the browser and the email client, but you REALLY don't want to do that.

You don't want to send via their Outlook client anyway, because that would make your program useless to anyone not running Outlook, or running on a device which doesn't have Outlook.

Clearly a better solution to your actual problem is desirable.

>> The client wants to use their own signatures

So allow them to create signatures in your program, and attach them where they are appropriate.

cheers
Bruce
Title: Re: How can I Send email using Client own Outlook
Post by: trent on June 09, 2014, 01:23:09 AM
>>>you can't.

This isn't entirely true. You can send emails using the client's email client using Javascript:

p_web.Script(p_web.WindowOpen('mailto:?subject=This is a Subject&body=This is the body part of the email%0D%0A%0D%0ASent from App Name - www.appwebsite.com','_self'))

In all major browsers the 'mailto' will ask the user which mail client they want to open, including (but not limited to) Gmail, Outlook and Hotmail: http://css-tricks.com/snippets/html/mailto-links/

It even works on mobile devices.

This also allows for the end user to include their own signature in the email without having to store the signature in a database.

The only problem is you cannot attach a file to the email.

Regards,
Trent
Title: Re: How can I Send email using Client own Outlook
Post by: terryd on June 09, 2014, 02:46:10 AM
What I have done when a client wanted copies of emails generated from his website was to cc (or bcc) the email to his outlook application and then set a rule in Outlook that all incoming emails with certain subject criteria are sent to a websiteemailed folder
Title: Re: How can I Send email using Client own Outlook
Post by: Bruce on June 09, 2014, 04:47:27 AM
that's a good tip Trent!
Title: Re: How can I Send email using Client own Outlook
Post by: Alberto on June 09, 2014, 06:45:33 AM
I´m trying to use Trend idea in a button (on-click())
but

p_web.Script(p_web.WindowOpen('mailto:?subject=This is a Subject&body=This is the body part of the email%0D%0A%0D%0ASent from App Name - www.appwebsite.com','_self'))

p_web.WindowOpen

throws an error

Cannot call procedure as function

Title: Re: How can I Send email using Client own Outlook
Post by: trent on June 09, 2014, 02:05:11 PM
Thanks Bruce :)

Hi Michelis,

The 'OnClick' function is just for pure javascript. So to make it work in the OnClick field:

window.location.href = "mailto:?subject=This is a Subject&body=This is the body part of the email%0D%0A%0D%0ASent from App Name - www.appwebsite.com"

If you need to use clarion code for the email To, Subject or Body then you will need to omit the code in the embeds and handcode it.

Regards,
Trent