I was searching many hours but I could not find a proper solution for me yet.
I don´t want to use the Sendmail functions direct out from Apex, because I want the users be able to change the mailtextes after generating them out of Apex.
Second I want to have all the sent mails in the sent items folder of every user in outlook.
Initial position:
I have a APEX page (e.G. P20) with all the necessary parameters for the eMail I would like to generate.
P20_MAILADRESS
P20_MAIL_SUBJECT
P20_MAIL_BODY
P20_TITLE
P20_NAME
I would like to have a Button (Send eMail) that initiate an automatic handover to Outlook similar to
mailto: &MAILADRESSE ? &subject= &SUBJECT. &body= &MAILTEXT. ...
The best I found in the meanwhile was:
PL/SQL Block Mailto with window.location.href
This solution was not that bad, but in my case it was working only once. After you have to restart the browser-window
If you don´t do that you will get a blank browser window the second time you start this procedure.
I also tried a simple solution putting:
<form> <input type="button" value="Send eMail" onClick="location.href='mailto: eMail@Adress.com &subject= &SUBJECT. &body= &MAILTEXT. '" /> </form>
into the HTML part of my page.
Here I got 2 problems
1. I could not succeed to exchange the eMail Adresse by a page element or by a global element
2. When I want to leave this page later I got an error massage like this:
violation of pageprotection. This coul occour if you redirect a page that is not loaded completely or you try to change some protected elements manually...
originally in GERMAN it is:
Seitenschutzverletzung: Dies kann auftreten, wenn Sie eine Seite weiterleiten, die noch nicht vollständig geladen wurde, oder wenn Sie geschützte Seitenelemente manuell ändern. Wenden Sie sich an den Anwendungsadministrator, wenn Sie weitere Hilfe benötigen.
Any link or any idea that helps me out of this mess??
Thanks in advance
Steffen