Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ralph van Vugt 57 posts 101 karma points
    Apr 04, 2011 @ 08:59
    Ralph van Vugt
    0

    Doc2Form Multiple recipients

    Does anybody know if it is possible to set multiple recipients for the mail to administrator field? I set the user BCC email-field, but then the submitter also gets a copy. 

  • Rich Green 2246 posts 4008 karma points
    Apr 04, 2011 @ 10:24
    Rich Green
    1

    Hey Ralph,

    I have no idea but worth trying to comma separate them as this works in the .NET mail protocol.

    [email protected], [email protected]

    Rich

  • Ralph van Vugt 57 posts 101 karma points
    Apr 04, 2011 @ 10:56
    Ralph van Vugt
    0

    Hi Rich,

    Thanks for your reply! Unfortunately that didn't work either. Ending up by changing the code in Doc2Form.asxc.cs in a way the user email is sent to the field entered in the BCC field. (somewhere around line 1016).

    It works!

    Ralph

  • Gregg Duncan 48 posts 70 karma points
    Jun 05, 2012 @ 23:29
    Gregg Duncan
    0

    I realize it's been a while since this was posted but for those that would like to send Doc2Form emails to multiple recipients it only requires a small modification to the doc2form.ascx.cs file in the App_Code Folder.

    Search the file for:

    mm.To.Add(new MailAddress(_formToAddress));

    and replace it with:

    char[] delimiters = { ',', ';' };
    string[] toAddresses = _formToAddress.Split(delimiters);
    foreach (string toAddy in toAddresses)
    {
         mm.To.Add(new MailAddress(toAddy));
    }


    Now you can enter multiple addresses in the "Send to email address" field separated by either a comma or a semi-colon and it will send to multiple email addresses.

    Hope this helps someone.

Please Sign in or register to post replies

Write your reply to:

Draft