+ Reply to Thread
Results 1 to 2 of 2

Send mail via VBA through a proxy address?

  1. #1
    Registered User
    Join Date
    04-13-2006
    Posts
    4

    Send mail via VBA through a proxy address?

    Hello,

    I have a macro to send a bunch of statements to clients though Outlook. Is there a way I can send the mail with a proxy "From" e-mail address? I would like the mail to come from our group e-mail address instead of the individual that is sending so and querries will come back to the group address. Below is an excerp of my code. My firm has an external program that will assist with this but I'd rather do it right in VBA if at all possible to try to avoid making everyone install the program. Any help is greatly appreciated!!!

    Dim out As Object
    Dim prevday As Integer
    prevday = 0

    Set out = CreateObject("Outlook.Application")
    With out.CreateItem(olMailItem)
    .Recipients.Add recipient1
    .Subject = Format(DateAdd("d", Date, prevday), "ddmmmyy") & " Statement"
    .Body = "Please find attached your daily statement."
    .Attachments.Add path1 & fn1
    .Send
    End With

  2. #2
    Ron de Bruin
    Guest

    Re: Send mail via VBA through a proxy address?

    Hi Iwant2learn

    Don't know about Outlook but you can do it with CDO
    http://www.rondebruin.nl/cdo.htm



    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Iwant2learn" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello,
    >
    > I have a macro to send a bunch of statements to clients though Outlook.
    > Is there a way I can send the mail with a proxy "From" e-mail address?
    > I would like the mail to come from our group e-mail address instead of
    > the individual that is sending so and querries will come back to the
    > group address. Below is an excerp of my code. My firm has an external
    > program that will assist with this but I'd rather do it right in VBA if
    > at all possible to try to avoid making everyone install the program.
    > Any help is greatly appreciated!!!
    >
    > Dim out As Object
    > Dim prevday As Integer
    > prevday = 0
    >
    > Set out = CreateObject("Outlook.Application")
    > With out.CreateItem(olMailItem)
    > Recipients.Add recipient1
    > Subject = Format(DateAdd("d", Date, prevday), "ddmmmyy") & "
    > Statement"
    > Body = "Please find attached your daily statement."
    > Attachments.Add path1 & fn1
    > Send
    > End With
    >
    >
    > --
    > Iwant2learn
    > ------------------------------------------------------------------------
    > Iwant2learn's Profile: http://www.excelforum.com/member.php...o&userid=33461
    > View this thread: http://www.excelforum.com/showthread...hreadid=534601
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1