Email to multiple recipients?

teeterteeter Member Posts: 46
It seems this subject as been beaten to death, but I can't seem to find the solution I'm looking for.

I'm trying to put multiple emails in either the ToName or the CCName. I'm using the MapiHandler. Is there any way to do this without generating a separate email for each address in the list? I'm using NAV 4.0 SP3 with outlook to send the mails. Any help would be greatly appreciated.

Thanks in advance!

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    teeter wrote:
    It seems this subject as been beaten to death, but I can't seem to find the solution I'm looking for.

    I'm trying to put multiple emails in either the ToName or the CCName. I'm using the MapiHandler. Is there any way to do this without generating a separate email for each address in the list? I'm using NAV 4.0 SP3 with outlook to send the mails. Any help would be greatly appreciated.

    Thanks in advance!

    Lanham's E-Ship granule does this pretty well.
  • ara3nara3n Member Posts: 9,255
    You can also use Jmail or smtp ocx, or use the navision.smtp dll file.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • teeterteeter Member Posts: 46
    I would love to do that, but there isn't a chance the client's IT guy is going to allow that to happen. If there is a solution for me, its going to have to go through outlook #-o
  • ara3nara3n Member Posts: 9,255
    If I remember correctly, you can call add recipient multiple times, or separate them by semicolon.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • davmac1davmac1 Member Posts: 1,283
    If it is to the same group of people on a Microsoft Exchange Server, you could have them set up a group and email to the group which will then send the email to the individuals in the group.
  • teeterteeter Member Posts: 46
    ara3n:
    I read a post along similar lines, but couldn't get it to work. I tried
    mapi.ToName := 'liono@thundercats.com;panthro@thundercats.com';
    to test this, and no go.
    Also tried something like,
    ---
    mapi.ToName := 'liono@thundercats.com';
    mapi.Send;
    mapi.ToName := 'panthro@thundercats.com';
    mapi.Send;
    ---
    This just sends 2 emails out with the respective addresses.

    DavMac1:
    Good idea, I'll look into this for our office use, however, the client is sending all of these reports out to their clients, they need the list of emails to be dynamic and easily editable by the user (their IT guy is not very friendly, or personable and they try to avoid him as much as possible)


    I'm using the mapihandler automation. Which, when I looked into the Mail codeunit, was also being used. The object has only 2 methods and 8 properties. This doesn't seem like much room to fool around with. Am I using the right object for the job? It seems there has got to be a better, or a least more customizable way, to be doing this.

    On a side note, the client is OK with having the object email the report once per email in the list, but now I personally want to know if it can be done :wink:
  • davmac1davmac1 Member Posts: 1,283
    You could have the Outlook email form pop up and the user can then edit and add names in Outlook.
  • boywonderboywonder Member Posts: 179
    teeter - interesting post and I notice no-one has given the answer you want.

    I'm in the same boat - using Exchange groups won't work because the data is being maintained in Navision as you would expect.

    The solution for me was simply to comment out the line...

    MAPIMessages.ResolveName;

    Tested fine here :wink:
Sign In or Register to comment.