Add a ReplyTo or From in a mail using OLE2 in Forms 6

Hi,
I am doing a form to automatically send mails (I use forms because I do Excel docs using OLE to link them to the mails...). It works but the From and ReplyTo properties.
My code is:
FUNCTION Send_a_mail( Recp IN varchar2,
                                             CopyTo IN varchar2,
                                             CopyHidden IN varchar2,
                                             MailFrom IN varchar2,
     Subject IN varchar2,
     Text IN varchar2,
     Attch IN varchar2,
     dialog IN number ) RETURN NUMBER
IS
objOutlook OLE2.OBJ_TYPE;
objMail OLE2.OBJ_TYPE;
objArg OLE2.LIST_TYPE;
objAttach OLE2.OBJ_TYPE;
BEGIN
     -- Connect to  Outlook
objOutlook := OLE2.CREATE_OBJ('Outlook.Application');
     -- Create the Mail
     objarg := OLE2.CREATE_ARGLIST;
     OLE2.ADD_ARG(objarg,0);
     objMail := OLE2.INVOKE_OBJ(objOutlook,'CreateItem',objarg);
     OLE2.DESTROY_ARGLIST(objarg);
     IF Attch IS NOT NULL THEN
          -- Attach 1 file
          objAttach := OLE2.GET_OBJ_PROPERTY(objmail, 'Attachments');
          objarg := OLE2.CREATE_ARGLIST;
          OLE2.ADD_ARG(objarg, Attch ); -- filename
          OLE2.INVOKE(objattach, 'Add', objarg);
          OLE2.DESTROY_ARGLIST(objarg);
     END IF;
     -- Addresses
     IF MailFrom IS NOT NULL THEN
          OLE2.SET_PROPERTY(objmail,'From',MailFrom);
          OLE2.SET_PROPERTY(objmail,'ReplyTo',MailFrom);
     END IF;
     OLE2.SET_PROPERTY(objmail,'To',Recp);
     IF CopyTo IS NOT NULL THEN
          OLE2.SET_PROPERTY(objmail,'Cc',CopyTo);
     END IF;
     IF CopyHidden IS NOT NULL THEN
          OLE2.SET_PROPERTY(objmail,'Bcc',CopyHidden);
     END IF;
     OLE2.SET_PROPERTY(objmail,'Subject',Subject);
     OLE2.SET_PROPERTY(objmail,'HTMLBody',NVL(Text,' '));
     -- Send
     IF dialog = 1 THEN
          OLE2.INVOKE(objmail, 'Display');
     ELSE
          OLE2.INVOKE(objmail, 'Send');
     END IF;
     -- Free ressources
     OLE2.RELEASE_OBJ(objmail);
     OLE2.RELEASE_OBJ(objOutlook);
     return 0;
END;
Because I have no docs, I used Bcc, CC... and it works, so I thougth 'From' and 'ReplyTo' should work too, but it doesn't.
Has any one a hint, or the true knowledge of this?
Thanks a lot.
Christian

I think you're goining to have to find some documentation on the Outlook OLE interfaces. I've always found this kind of stuff on msdn.microsoft.com, although google os always up for it...

Similar Messages

  • Switching from Entourage to Mail: use Entourage Groups?

    I'm attempting to switch from Entourage to Mail and Address Book (not least because of the attractions of smart folders, etc), but I can't figure out how or if I will be able to send occasional email mailshots to large groups of people.
    I run an occasional newsletter in email format. Because the list is very large, it wouldn't make sense to set up individual vCards for each individual email address on the list, and yet that seems to be the only way to email all the members of a group using Mail and Address Book.
    With Entourage, on the other hand (and I would dearly love to wave goodbye to it in all other respects) I could set up a Group exactly as I would set up an individual contact, then copy the entire list to it, and could even add occasional new email addresses whenever I liked or delete others as they opted to leave the group.
    Am I missing something in Mail / Address Book, or will I have to cut and paste into the To: box my entire long list each time I need to send a mailshot? (And doing that would involve using a word processor or text editor in order to manage the list, which is adding yet another programme to what should be a pretty simple task...)
    Many thanks for any advice anyone can offer.
    Powerbook G4 Mac OS X (10.4.4)

    Yes. Importing your mail from Entourage does not affect the Entourage database.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Is there any way to add a task/reminder from iCal or Mail besides adding flags that have no date reminders?

    Am I missing something? Is there a 3rd party software that does this? I came from Outlook with the ability to add tasks to my daily to-dos and give them start/end dates.  Where can I do this with OSX 10.7?

    Thanks for the feedback Kip - I did see this option in iCal, which BTW is not optimal at all as you have to retype the action item and due date. I was looking for a way to add to dos and reminders with due dates directly from Mail as I did with Outlook. I get a ton of emails that I want to follow-up on, but want to chhose when I get reminded, and actually have a remider pop-up when it is due/overdue.  Hope that makes sense.

  • Problem syncing old emails from Outlook to Mail using Exchange 2010

    HI,
    I recently switched from Outlook 2011 to Lion Apple Mail.  I am set up for email through my comany's exchange server.  When I set up Mail, all of my folders showed up on my Mail account successfully but it will only sync back the last 60 days of emails.  I know these old emails do reside on the server.  Is there potentially a setting on mail to adjust how back it syncs?  If not, can someone suggest a work-around.  I would only have to do this once.
    Thanks

    When transferring a locally stored message that was recieved a year ago to a server stored mailbox with an IMAP account - doing this today for example, the recieved date for the message is changed to today's date - at least with an email client used to access the account.

  • Create new iCal event from contents of mail uses wrong date

    I received an email today with an appointment using the date "6/3/2010 at 4PM". Being from the US, it is obvious to me that this meeting should occur on June 3, 2010, but when I attempt to create a new iCal event with this date it creates the event on March 6, 2010. Even more confusing is that when I choose "Show this date in iCal" it highlights March 7, 2010!
    My question is:
    Shouldn't the system default to a month/day/year date preference everywhere when I've selected US English in the internationalization preferences pane?

    have a very similar question: is there somewhere an application where I can, when receiving an email, put it into iCal so that I am reminded about it in a week or something?

  • Add New line item from Quote to Contract using CRM_ORDER_MAINTAIN

    HI Gurus,
    I need to add a new line item with entire item details such as SALES PRICING etc in contract,
    i am confused like what are the parameters i need to pass to FM CRM ORDER MAINTAIN,
    Please help me on this regard.
    Thanks & regards.

    Experts,
    any luck i have please help me on the same.
    Thanks.

  • Why can't I print anything from my e-mail using Firefox

    I am using a HP 8180 All-in-One printer when I try to print something It comes up with a MY Documents and asks me to name it. When I do it doesn't print anyway. Please help if you can!

    Hi swenzel,
    Can you be a little more descriptive of the problem? You say you "cannot copy it" but don't give any details. There are several methods for copying text like ''Ctrl + C'', right click ''copy'', ''Edit > Copy'' etc. Which method are you trying? When you do try, what happens? Is the option not there? Does the text just not appear when you try to paste it? We need more details to really be of use.
    Just a guess, but you might want to try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit. You should look at the [https://support.mozilla.org/en-US/kb/Troubleshooting-extensions-themes Extensions and Themes troubleshooting guide ] and the [[Troubleshooting plugins]] article as well.
    Hopefully this helps!

  • Migrating from Entourage to Mail

    I want to move my E-Mail from Entourage to Mail. I'm using a new MacBook Pro with 10.6.1and wondered if there were any tips I need before I start the process.
    I'm intending to use the "File/Import Mailboxes" function in Mail
    Also - I have a lot of subfolders which will also need transferring to Mail and am a little scared of messing up the process and losing important messages.
    Any advice before I make the transfer will be gratefully received.
    Thanks

    I had nothing but problems with it.
    I got a roughly 15 GB mail database (roughly 100.000 messages) which I am trying to import from Entourage to Mail using 10.6.1. None of my folders with more than roughly 2500 - 3000 messages in them could have been taken over. None of them. When the import reaches somewhere more than 2000 messages in the actual folder, the import stops and just results all the rest of the folders left empty.

  • After upgrading from Mavericks to Yosemite I can no longer find in Mail the icon (looks like the Add To Contacts icon without the   mark) I used to press in order to obtain an e-mail address from my contact list. What procedure should I use now in or

    After yesterday upgrading from Mavericks to Yosemite I can no longer find in Mail the icon (looks like the Add To Contacts icon without the + mark) I used to press in order to obtain an e-mail address from my contact list. What procedure should I use now in order to quickly add an address to an e-mail that I wish to send?
    Bob

    On the right of the To: field you will see a circled plus sign:
    Click it.

  • How to edit or add text to a PDF file from an e mail

    I would like to open a PDF file from an e mail received to work the file to edit and or add text, my e mail service is  LIVE.CA  (hot mail), I have Iwork 09 

    You can convert the PDF text to regular text (.txt) and then import/open into another program and make your changes, then save the file in the programs format (for your later editing) and then choose Print from the program and there may/may not be a option to save as PDF again.
    You'll need a free (limited use) PDF to text utility like
    PDF OCR
    http://solutions.weblite.ca/pdfocrx/
    Trouble here of course is you lose all the formatting and have to reformat, but it's a lot less expensive than Adobe's software.
    LibreOffice is free to use and can save as PDF format if iWork doesn't save as PDF, it should unless Apple is really peeved at Adobe.

  • Since installing Lion, I am unable to add to iPhoto from an e mail or desk top. Something about power pc.  I thought I had a Mac! What should I do to restore the facility?

    since installing Lion, I am unable to add to iPhoto from an e mail or desk top. Something about power pc.  I thought I had a Mac! What should I do to restore the facility?

    As a Test:
    Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

  • Following = Impossible; no such option in mail preferences - iCloud Mail couldn't be enabled from the iCloud Preference Pane. Open Mail and add your iCloud account from Mail preferences.

    iCloud Mail couldn't be enabled from the iCloud Preference Pane.
    Open Mail and add your iCloud account from Mail preferences.

    What is your question?

  • Mail "New Message" window retreats to background after drag and drop attachment from Finder to Mail "New Message", click, and Finder window stays in foreground even when not in focus

    Hi, I'm surprised I can't quickly find if anyone else is having this issue. For me it has been going on since Lion on my 13" MacBook Pro 2011 and it's still persisting in Mavericks, and even still now that I've "downgraded" to a 15" MacBook Pro 2010 with Mavericks.  The behavior is odd and difficult to explain concisely. Basically, when I want to add an attachment to Mail, I'll Cmd+Tab over to Finder click and drag and Cmd+Tab back to Mail, and drop the attachment. At first it looks fine, but when I click in the New Message window where I just dropped the attachment, to move the cursor, it retreats to the background and the Mail Main Window comes to the foreground. Then, if I click on that, the Finder window that I just used comes to the foreground. Sometimes if I switched to another app before going to Finder to select the drag and drop, that other app window will appear in the foreground instead. If I click on the other app window that is now in the foreground, then the Finder window that was last used will come to the foreground. The only thing that seems to fix this switch-a-roo effect is Cmd+Tab-ing back and forth a few times, or click on the window "frame" at the top to move the window around.
    The way to prevent this is to have my Mail Message window visible in the foreground side by side with the Finder window when the drag and drop occurs (this is a tedious extra step if mulitple windows are open, or to use the add attachment command in the menu within Mail. But it sure is annoying buggy behavior.
    Thanks
    Daniel

    Yep, I get exactly the same thing when using Thunderbird mail client on my 2011 iMac running Lion. I've been putting up with it for at least a year, maybe longer.
    For me it appeared to start after a Thunderbird update, so I figured that was the cause and couldn't find a solution at the time. However I've now noticed it starting to happen in Apple Motion 4 when dragging files from Finder into a DropZone in my animations. Motion remains the active program but the Finder window sits on top until I Cmd-tab out to a third open program (ie not Finder) and back to Motion again.
    This is the first indicator I've had that it's an OS X issue.
    Be great to find a solution as D&D is by far my preferred way of adding attachments to emails and similar tasks.

  • I don't know where the paste button or tab is , I need to paste an address into firefox from an e-mail I have

    I am trying to paste a link from an e-mail in windows and can't find a paste/copy tab in firefox. Where is it? or how do I do it?

    Which problems do you have on that website?
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • HT2500 How do I copy multiple e-mail addresses from an e-mail to a new e-mail?

    How do I copy multiple e-mail addresses from an e-mail to a new e-mail in the Mail program on MacBook Pro. Received an e-mail with multiple recipients, and need to send a new e-mail to the list.

    Received an e-mail with multiple recipients, and need to send a new e-mail to the list.
    You could select Reply All from the icons above the email.
    If Reply All is not shown, go to Mail / View / Customize Toolbar, and add that icon.

Maybe you are looking for

  • How do I choose which version of Acrobat will be updated?

    I have a Mac Pro with one hard drive dedicated to nightly clone backups of my main drive. When the Adobe Acrobat Updater tells me that an update "to version 11.0.02 is available. Do you want to install it now?" How can know and/or choose which versio

  • Iterating through all Document Libraries, Folder and Item -Sharepoint 2010

    Hi I want to read all RootFolder,Subfolder along with all "items" from Document Librarie. Can anyone please advise on this Thanks

  • OWB 10.2 script OMB+ to list mapping operator type

    Hi all, I'm using OWB 10gR2 and I want run an OMB+ script to list all operators (name and type) for all mappings in a project. With some loops in TCL, I can list mappings with OMBLIST MAPPINGS For each mapping, I can list operators with OMBRETRIEVE M

  • Error while connecting to Cloudscape Database

    Hi All, I am working on Sun's reference implementation App Server verson 1.3.1. It comes shipped with cloudscape database. When I write try to connect to this App Server through JSP that calls methods through Enterprise Java Beans I get this Error Me

  • ID CS6 export to PDF behavior

    I have just upgraded form CS4 to CS6. When exporting to PDF in ID CS4 I was presented with a progress bar whilst exporting. Also after exporting the finished PDF would open in Acrobat. In ID CS6 neither of these things happen. I can see the advantage