Jump to content

Recommended Posts

Hi community

In MS Outlook I'm trying to send an email from a functional box ( do not know if term is well translated ), meaning my personal box is firstname.name@domain.fr and I'd like to send a mail from it-group@domain.fr ( screenshot attached )

As I am not very skilled with OL UDF, i just pick somewhere code below that fits to my needs : send mails with HTML body
Now I need to change the" From" field to pick up one from the combo list

1° Is there a way to get the OL list of "From" addresses ? ( _OL_AccountGet only returns my personnal address )

2° What is the way to set "From" field to something else than my personnal adress ?

I tried such code without any success

Local $oOutlook = _OL_Open ( )
    Local $oMail = _OL_ItemCreate ( $oOutlook, $olMailItem, "", "", "Subject=" & $Object )
    $oMail.BodyFormat = $olFormatHTML
    $oMail.GetInspector
    $Signature = $oMail.HTMLBody
    $oMail.HTMLBody = "test" & $Signature
    $oMail.To = $Dest
    ; 1st try = fail
    ;$oMail.SenderEmailAddress = "it-group@domain.fr"
    ; 2nd try = fail
    ;$oMail.From = "it-group@domain.fr"
    _OL_ItemSend ( $oOutlook, $oMail )

Any help appreciated

Regards

Outlook.png

Link to post
Share on other sites

This post might help:

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-07-28 - Version 1.1.0.0) - Download - General Help & Support - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...