Any interest in sending emails as Outlook appt. request???

All,
I recently had a business need to send emails as meeting requests in Outlook. There are two ways to do this:
1. The appt is sent as an attachment that a user can open and accept.
2. The appt is sent as the email.
The latter was the business requirement. This is done be combining a vcalendar standard with some things that Outlook needs to see the email as an appointment.
It was a pain in the butt but I've made progress and got it working. It will NOT work with APEX_MAIL.
I'm posting this because I know this is not just ApEx specific but if some people are interested, and the forum administrators don't mind, I'll post some details to get the ball rolling for others.
Please respond to this if you are interested.
Regards,
Dan

All,
Of the two methods I mentioned before I will explain the second: sending the appointment as the email. The trick here, and the reason APEX_MAIL will not work, is that the email is a MIME multipart message that consists of two parts: the icalendar object and the regular message data. APEX_MAIL, at least for now ;), is not robust enough to allow us to create and specify the custom MIME types needed. For the basics on multipart messages see the following...
http://en.wikipedia.org/wiki/MIME#Multipart_Messages
For those of you that have the ability to use Java, the javax.mail package will work BUT REQUIRES MODIFICATION. See the following for details...
http://forum.java.sun.com/thread.jspa?threadID=169827&start=0&tstart=0
If you would prefer to keep your solution in PL/SQL or do not have the ability to use Java, I've included a specification and body for a basic procedure, SEND_MAIL, that can be added to any package. This is only a basic procedure to help get you started and requires EXECUTE ON UTL_SMTP.
All you have to do is call the SEND_MAIL procedure passing a valid icalendar object to the p_body_cal parameter. For details on that see the following…
http://en.wikipedia.org/wiki/ICalendar
I HIGHLY recommend creating a function to create your icalendar objects for you. Let me know if you would like an example of such a function.
SEND_MAIL spec
   PROCEDURE send_mail (
      p_from         IN  VARCHAR2
    , p_to           IN  VARCHAR2
    , p_subj         IN  VARCHAR2
    , p_body_html    IN  VARCHAR2
    , p_body_cal     IN  VARCHAR2
   );SEND_MAIL body
   PROCEDURE send_mail (
      p_from         IN  VARCHAR2
    , p_to           IN  VARCHAR2
    , p_subj         IN  VARCHAR2
    , p_body_html    IN  VARCHAR2
    , p_body_cal     IN  VARCHAR2
   AS
      l_connection   UTL_SMTP.CONNECTION;
      l_mail_server  VARCHAR2(255) := 'mail.yourserver.com';
      l_mail_port    PLS_INTEGER := 25;
      l_msg_hrd      VARCHAR2(32767);
      l_msg_body     VARCHAR2(32767);
      l_lf           VARCHAR2(2) := CHR(13)||CHR(10);
   BEGIN
      l_msg_body := ''
         || 'Date: ' || TO_CHAR(SYSDATE,'DAY, DD-MON-RR HH24:MI') || l_lf
         || 'From: <' || p_from || '> ' || l_lf
         || 'Subject: ' || p_subj || l_lf
         || 'To: ' || p_to || l_lf
         || 'MIME-Version: 1.0' || l_lf
         || 'Content-type: multipart/mixed; boundary="frontier"' || l_lf
         || '--frontier' || l_lf
         || 'Content-Type: text/calendar' || l_lf
         || 'charset="utf-8"' || l_lf
         || 'method=REQUEST' || l_lf
         || 'component=vevent' || l_lf
         || l_lf
         || p_body_cal || l_lf
         || '--frontier' || l_lf
         || 'Content-Type: text/html' || l_lf
         || 'charset="utf-8"' || l_lf
         || l_lf
         || p_body_html || l_lf
         || '--frontier--';
      l_connection := utl_smtp.open_connection(l_mail_server, l_mail_port);
      utl_smtp.helo(l_connection, l_mail_server);
      utl_smtp.mail(l_connection, p_from);
      utl_smtp.rcpt(l_connection, p_to);
      utl_smtp.data(l_connection, l_msg_body);
      utl_smtp.quit(l_connection);
   END send_mail;Good luck and happy coding.
Regards,
Dan
I forgot to define l_lf...
Message was edited by:
dmcghan

Similar Messages

  • Can't send email from Outlook with parentheses in address

    I can't send email from Outlook 2007 through my WRT400N when Outlook displays the address with parentheses as in this example: Firstname Lastname ([email protected])
    I can send if the address is in this form: Firstname Lastname <[email protected]>
    I have tested with the ISP and nothing gets through the router when the problem occurs. When I bypass the router, both forms of address will send correctly. This problem is perfectly reproducible. My router is brand new, but the problem did not show up for about a week after installation. OS is Win7. Any ideas? Thanks.
    -JimW
    Solved!
    Go to Solution.

    Try to forward the port 443 to 447 on the router.Check this link.

  • Can't Send Email through Outlook using blackberry as a modem

    I am using my blaclberry 8900 as a modem and cannot send emails through outlook. I have called t-mobile and they say that it cannot be done. However I could do it with my Nokia. Any suggestions?

    Outlook folder permissions are Outlook issues, try the Microsoft Outlook Forums.

  • Outlook 2010 address book prompt out hen trusted program try to send email through Outlook 2010

    Dear all,
      My program will send email through Outlook 2010(in cache mode). Sometime it may prompt the address book out and pend here, and we need to manually click "OK" to let the program run again. Although we re-write the program in
    Java and send by JavaMail now, but we are interested why the address book will prompt out.
      There are no pattern that we can guess the reason. Different recipient, different subject/content/have attachment or not can casue the address book prompt. But same email with same content/everythings may not cause prompt before and/or after.
      We try to change to offline address book and need manual sync, problem still occur.
      Just for interest~
    Cyrus
    [Sorry that MSDN not allow me to upload the cap screen :( ]

    Firstly, there is no such thing as a "trusted program" to Outlook. It only trusts COM addins, all other applications will cause a security prompt unless you have an up-to-date anti-virus app installed (if you can control the client environment).
    See http://www.outlookcode.com/article.aspx?id=52 for the list of your options. Essentially it is either installing an antivirus product or using a library such as
    Redemption (accessible from Java) or a utility such as
    ExpressClickYes.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • E51 send email Via outlook

    Hi ALL
    HELP PLEASE!!!!!
    Is it possible to send email via outlook from my Nokia E51? I have access to the exchange version on my outlook is there anyway or is it possible to send/recieve email through this?
    Any help/feedback would be great!!!
    Kris

    Can anyone help??!?! PLEASE??!

  • Sending emails from outlook - suddenly not getting...

    Hi everyone, I am new here but a btinternet customer for a good while. I have been quite happily sending emails from outlook to both other btinternet email addresses and a variety of non bt emails. all of a sudden on Thursday, they stopped being received by the recipient. The send/receive process seems to work (visually) and the logs and outbox show they have been sent - but nothing is received at the other end.
    I have not touched any settings etc, so what could be the problem?
    Looking to find out if there is anything I can do at my end or whether BT needs informing (though I cannot see who to contact).
    Yours in anticipation,
    Mark

    newstead wrote:
    Hi everyone, I am new here but a btinternet customer for a good while. I have been quite happily sending emails from outlook to both other btinternet email addresses and a variety of non bt emails. all of a sudden on Thursday, they stopped being received by the recipient. The send/receive process seems to work (visually) and the logs and outbox show they have been sent - but nothing is received at the other end.
    I have not touched any settings etc, so what could be the problem?
    Looking to find out if there is anything I can do at my end or whether BT needs informing (though I cannot see who to contact).
    Yours in anticipation,
    Mark
    Hi Mark.
    Is this still a problem ?
    Was the problem to all of your recipients, or just one or two ?
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • Sending email through outlook

    Hi,
    i got a email functionality requirement , i need to send the report output to recipient inbox as an attachment, through outlook.
    i know how to send email from sap, but through outlook i am not aware,
    how to send email through outlook.
    can any one please help me.
    Thanks In Advance
    raagati

    Hi,
       check below link.
    How to send email from outlook to SAP inbox

  • Is there any way to send email messages to Ipages

    IIs there any way to send email messages to Pages please

    Tap and hold or double tap to highlight a word in the email.  Drag the handles to capture what you want.  Tap copy.
    Now paste that into Pages by tapping and holding until you see the paste button.
    See p. 26 of the User Guide.

  • Cannot send emails via outlook 2011

    I have an iMac and I cannot send emails via outlook 2011. I get an error code 3210. Can anyone help?

    Does not help.. my problem is a little different
    I have an iMac and I cannot send emails via outlook 2011. I have 3 emails stuck in the sent box... They are not in my sent or inbox. Every time I send an email it first tries to send these 3 mails. for 2 I get an error code 3210 and for one "5.1.2 or other punctuation after the recipient's email address. g5sm23942864eem.4". I have an euronet account and not a hotmail account.

  • How do i send emails with outlook express from firefox

    how do i send emails with outlook express from firefox

    You can add a button by using the [http://webdesigns.ms11.net/getmail.html Get Mail] add-on.

  • Send Email via Outlook 2007 with "send to field" blank.

    I have a simple question:
    - How do I get the user's Outlook 2007 "New Email Message" box to open up when the user clicks on a button called "Send Email"?
    - Outlook is the default Email client on each user
    - I need the Outlook box to open, with the following values prefilled:
    To: blank (so the user can type in an address)
    From: [email protected]
    Subject: blah, blah, blah
    Body: Hello, etc...
    The part I'm having trouble with is getting the Send To field to be blank or unfilled?

    Leonard, Thanks for the quick post..
    Along with your tip, I ended up doing the following, which worked perfectly:
    <cfset to_email="">
    <cfset subject_text="Here is the Link to the Form..">
    <cfset body_text="Welcome to the Step by Step Procedure!%0A">
    <cfoutput><a href = "mailto:#to_email#?subject=#subject_text#&body=#body_text#">Click to Send Email Link to Customer</a></cfoutput>
    Note: I used the %0A at the end of my Body text to help with formatting.
    One other question: How do I make this code above run directly from my SPRY menu?
    - Currently I have to open another form and then click on hyperlink text on the form
    - I would rather bypass the new form page altogether, and just call the code from my SPRY menu?
    - Here is the code behind my SPRY Drop-Down menu item:
    <li><a href="form_emailLink.cfm" target="_blank">Send Form Link</a></li>

  • Can't send email on outlook

    Have not been able to send email using Outlook for Mac 2011 since yesterday, get the message invalid username or password

    NOTE: I can receive emails but I CANNOT SEND.
    Error messages are:
    https://dl.dropboxusercontent.com/u/110096199/26-09-2013%202-52-45%20PM.jpg
    https://dl.dropboxusercontent.com/u/110096199/26-09-2013%202-52-22%20PM.jpg
    1) Send test e-mail message: An unknown error occurred, error code: 0x80004005
    2) Task '@#@$@@Me.com - Sending' reported error (0x80004005) : 'The operation failed.'

  • I'm having problems receiving/sending emails thru Outlook.

    I switched internet connection from AT&T to Comcast and I'm still utilized several AT&T email address's for free. I'm having problems receiving/sending emails thru Outlook.  Could the problem be due to using their free emails with no support.
    Do I have to go thru yahoo to read/send emails?

    Change the ISP would not effect the email connection generally. (Only when ISP disable your mailbox which they could control directly.)
    I suppose that your Outlook still store/cache the AT&T messages, try to export them as PST data file for backup.
    Setup the new Yahoo in your current Outlook first and then import that backup.pst to continue to use.
    http://support.microsoft.com/kb/287070/en-us
    Thanks
    Tony Chen
    TechNet Community Support

  • How many of you use CTRL + Enter to send email from Outlook

    It's a much faster option...and you don't have to grab that pesky mouse!

    I was working this morning and I asked my fiance if she used CTRL + Enter to send email from Outlook and she was not even aware that was an option. I have been using it for years and I wondered how many of you SpiceHeads use it as well?
    This topic first appeared in the Spiceworks Community

  • TS4002 As of 4pm PDT, I cannot send email from Outlook via iCloud; my wife has the same problem.  Where/how do I report this problem?  Apple support seems to be available only if one is using a Mac product.

    Originating discussion

    Same problem with sending mail from Outlook 2010 (Win7 64 bit - started yesterday) and Windows Live Mail 2011 (Win7 32-bit).
    Server Error 334
    Server Response 334
    Server: smtp.mail.me.com
    Error code 0x80004005
    Protocol smtp
    Port 587
    SSL
    No issues sending iCloud email from the browser / web iCloud interface or from my Android phone.
    Not finding any of this in Google searches yet.

Maybe you are looking for

  • Itunes can't synch photos to my iPhone, anyone?

    itunes can't synch my photos in iphone (iphoto in itunes) can anyone help me with this matter. Got no photo in my iphone now very sad.

  • War file deployment to Test env not working

    Hi All, i am using war file as scheduler for calling bpel process. Now i need to move the same war to test environment. For this i followed this site http://biemond.blogspot.ca/2009/04/using-weblogic-deployment-plan-to.html. But it is not working. ev

  • Hotmail emails are going missing in Mail

    Hi Has anyone found a resolution to this problem. All my Hotmail emails download fine into Mail when I configured it the first time but now when I go to click on a particular email, the whole folder content disappears. The messages are still on my ac

  • Why does my iPhone has two names?

    My iPhone 4 has two different names . One in My Computer where I enter to copy my photos from it to the my computer, and one in iTunes . Why is that? I have attached a photo : http://s8.postimage.org/hjp36vb85/why.png

  • Should I store my cr2 files in the aperture library?

    I have noticed aperture slowing, pausing and even crashing recently. I was wondering if storing too many cr2 files in the aperture library might cause this. At this time I have a little over 6000 cr2 files in the aperture library.