Sending mail with attachment - InfoPath Dev
in

InfoPath Dev

Sending mail with attachment

Last post 12-19-2005 07:04 AM by pouet. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 12-07-2005 11:13 PM

    • frala
    • Not Ranked
    • Joined on 11-09-2005
    • France
    • Posts 16

    Sending mail with attachment

    Hi,

    I have created a form and xhen it is submitted, a PDF is automatically generated. I would like to add it to the created mail using the XDocument.UI.ShowMailItem function.

    Note that automatically, the XML of the form is attached to this mail. If someone has a tip to remove it, I am also interested in it !!!

    Regards,

    Franck
  • 12-08-2005 01:10 AM In reply to

    Re: Sending mail with attachment

    Hi Franck,

    For the 2nd question ... there is an "Attachment Name" setting in the e-mail data connection wizard that controls whether or not the xml form is attached. Just delete it.

    For the 1st question ... neither ShowMailItem nor MailEnvelope allow specifying the attachment, so I think your best bet is to save the PDF to a share and add a link to it in the body of the sent e-mail. Good luck.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-08-2005 01:33 AM In reply to

    • frala
    • Not Ranked
    • Joined on 11-09-2005
    • France
    • Posts 16

    Re: Sending mail with attachment

    Hi Patrick,

    For the 1st problem, the issue is that this mail is sent to supplier. Therefore a link is not the solution.
    Tnanks for the tip about attachment name.

    Regards,

    Franck
  • 12-12-2005 12:49 AM In reply to

    • frala
    • Not Ranked
    • Joined on 11-09-2005
    • France
    • Posts 16

    Re: Sending mail with attachment

    Hi Patrick,

    Regarding the 2nd problem, as I didn't use the connection wizard, I don't where/how I can modify this property.
    I didn't read something about that in JScript documentation.
    Which object has the "Attachment Name" property ?

    Regards,

    Franck
  • 12-12-2005 06:33 AM In reply to

    Re: Sending mail with attachment

    I think Patrick was refering to a "Submit by email" button. It seems like you are submitting to e-mail manually via code - is this correct? To get where Patrick is talking about

    1) Add a button
    2) Double-click the button to open the properties
    3) Choose Submit from the Action drop-down list
    4) Click Define Action Properties
    5) Choose the second radio button
    6) Choose E-mail from the Submit to drop down
    7) Click the Add button
    8) At the bottom there is an Attachment name field - make sure that it is blank

    Hope this helps!

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-12-2005 06:45 AM In reply to

    • frala
    • Not Ranked
    • Joined on 11-09-2005
    • France
    • Posts 16

    Re: Sending mail with attachment

    You're right, Matt.
    As some checks and computations are performed before sending email, I define a button where some JScript functions are defined and if all tests are OK, a :
    objCommandBars = Application.ActiveWindow.CommandBars;
    objSave = objCommandBars.FindControl(1,3);
    objSave.Control.Execute();
    is done (the XDocument::OnSaveRequest function is overriden)

    Franck
  • 12-14-2005 12:10 AM In reply to

    • frala
    • Not Ranked
    • Joined on 11-09-2005
    • France
    • Posts 16

    Re: Sending mail with attachment

    Has someone a solution ?

    Franck
  • 12-14-2005 07:15 AM In reply to

    Re: Sending mail with attachment

    Franck,

    Sorry for the late response, I honestly don't know how you could do this very well. I did some googling and found this site where it looks like he did some trickery with creating an Outlook object and created an e-mail from a much simpler base. Check it out and I hope it helps!

    http://blogs.msdn.com/timpash/archive/2005/11/03/Alternate_Ways_To_Send_Mail.aspx

    ---------------
    Matt Faus
    InfoPath Dev Texas
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-19-2005 07:04 AM In reply to

    • pouet
    • Not Ranked
    • Joined on 10-28-2005
    • France
    • Posts 6

    Re: Sending mail with attachment

    Hi!

    Is it possible to call this VB function from JScript ?

    Alex
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.