NetTalk Central

Author Topic: How can I Send email using Client own Outlook  (Read 4096 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
How can I Send email using Client own Outlook
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: How can I Send email using Client own Outlook
« Reply #1 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

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: How can I Send email using Client own Outlook
« Reply #2 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

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: How can I Send email using Client own Outlook
« Reply #3 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
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: How can I Send email using Client own Outlook
« Reply #4 on: June 09, 2014, 04:47:27 AM »
that's a good tip Trent!

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: How can I Send email using Client own Outlook
« Reply #5 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

« Last Edit: June 09, 2014, 06:55:55 AM by michelis »
-----------
Regards
Alberto

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: How can I Send email using Client own Outlook
« Reply #6 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