Change "FROM" field on email data connection? - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

Change "FROM" field on email data connection?

Last post 07-24-2009 02:37 PM by Patrick Halstead. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 09-23-2008 12:25 PM

    • erik1
    • Not Ranked
    • Joined on 09-23-2008
    • Posts 2

    Change "FROM" field on email data connection?

    Hi...

    I am attempting to use infopath to generate client correspondence emails at my company.

    The problem I am facing is that the emails need to come from a shared email address, as opposed to an individual at the Help Desk. I have successfully added the contact selector, so populating the "TO" and "CC" fields is not a problem.

    I have yet to find a concrete answer one way or another as to whether or not this is possible.

    I know this cannot be done using the built in data connection tools, but thought it may be possible using code. Or even by having the form recognize the user as being part of a specific group, etc... 

    Any help would be greatly appreciated.

    -Erik

  • 09-24-2008 12:37 AM In reply to

    Re: Change "FROM" field on email data connection?

    I believe you could get this accomplished by an outlook rule.

    If you are using the IP client, the local outlook is being used.  Therefore setup each helpdesk person to be able to send from the shared address, which might already be done.  then use a rule to key in on something unique to these response emails and have it set the from automatically when it is sent.

  • 11-19-2008 09:33 AM In reply to

    • Pocket
    • Not Ranked
    • Joined on 11-17-2008
    • Posts 6

    Re: Change "FROM" field on email data connection?

    Erik,

    Did you find a solution for this?  I have exactly the same issue.

    Clay, unless I've misunderstood what you're saying, using Outlook to achieve this isn't an option.  Outlook will only process a rule after a message has been sent or received: for this to work, you would need it to process the rule before the mail was sent.

    Andy

  • 11-19-2008 09:41 AM In reply to

    • erik1
    • Not Ranked
    • Joined on 09-23-2008
    • Posts 2

    Re: Change "FROM" field on email data connection?

    yup...

     check this out.

    http://www.codeplex.com/SPDActivities

     we used the "Send Email Extended"

  • 11-20-2008 01:24 AM In reply to

    • Pocket
    • Not Ranked
    • Joined on 11-17-2008
    • Posts 6

    Re: Change "FROM" field on email data connection?

    Erik,

    Thanks for this.

    Unfortunately it doesn't solve my immediate problem in that I can't use SharePoint Workflow for this particular solution.  Ideally I need to be able to e-mail the form from within InfoPath itself using a different "From" address.

    However, I can see other situations where this code will be very useful.  Appreciate you taking the time to post!

    Andy

  • 11-20-2008 07:31 AM In reply to

    Re: Change "FROM" field on email data connection?

    You are right Outlook won't apply rules before send.

    I think that you could do this in Exchange though. In the hub role you can apply rules like to add disclaimers and such. So that would be another possiblity to intercept it in transit.

    Otherwise you would need to use code to send it and then you could set all the properties and send it via smtp rather than the outlook client. If it was a browser based form it gets sent from SharePoint, but I think i have seen this issue before that it only originates from the SharePoint's set address.  The only way I have seen this done is with an external email client. With the Qdabra web services suite, they send a workflow email after it has been submitted and this can be altered.

  • 11-21-2008 03:07 AM In reply to

    • Pocket
    • Not Ranked
    • Joined on 11-17-2008
    • Posts 6

    Re: Change "FROM" field on email data connection?

    Clay,

    Thanks for the follow-up.  Unfortunately we don't have Exchange 2007 installed yet, meaning we're unable to take advantage of the new features in the Hub Transport role.  However, it's worth knowing for future reference.

    We're trying to send the form directly from InfoPath (rather than SharePoint); that means that using code and an SMTP server is probably our only option.  Let's hope that Microsoft includes this in a future update or add-in, as I'm sure we're not the only people who are trying to do this.

    Andy

  • 07-24-2009 12:59 PM In reply to

    Re: Change "FROM" field on email data connection?

    Andy,

    you are right in that you are not the only one. I need to do the same as setting the from address to the logged in user. (this actually appears in the body). Please let me know if you have found a workaround by now.(even if is is code based)

     

    Thx

    MC

  • 07-24-2009 01:54 PM In reply to

    Re: Change "FROM" field on email data connection?

    Of course, you can do anything with code, but there’s a reason why SharePoint doesn't support it - AND THAT'S WHAT I AM TRYING TO GET YOU TO UNDERSTAND.

    Meanwhile, on planet earth, this forum is for help with InfoPath, not Exchange or SMTP coding questions.

     

    Patrick Halstead
    InfoPath MVP
  • 07-24-2009 02:11 PM In reply to

    Re: Change "FROM" field on email data connection?

    To reiterate this was about InfoPath. How do you change the from address of the email form field in the infopath form submitted via sharepoint site. Nothing to do with Exchange or SMTP.

  • 07-24-2009 02:37 PM In reply to

    Re: Change "FROM" field on email data connection?

    Once again. You can't do it dynamically for browser based forms without writing some code that is not secure.

    If you are using InfoPath rich client, the from address is the e-mail of the Outlook sender. That cannot be changed by default - it changes based on who is sending it. If you want to write your own app to do this based on SharePoint events (browser) or add a bunch of code to your InfoPath form, you can do this but it's going to require that you learn how and write the code. Hundreds of dollars of cost no doubt.

    If you have SharePoint workflows, you could probably configure e-mail to be sent from there too, but once again you can't send it from a user's account due to security issues.

     

    Patrick Halstead
    InfoPath MVP
Page 1 of 1 (11 items)
Copyright © 2003-2014 Qdabra Software. All rights reserved.
View our Terms of Use.