>I have figured out how to add attachments, put subjects, and messages using some of the code provided in the SENDMAIL sample. However, every time I try to put a recipient (because I want it to mail out automatically and not come up in front of the user), I get an error. Here is the code:
>
>CODE THAT I KNOW WORKS FINE
> this.parent.OleMMess.sessionid=this.parent.OleMSess.sessionid
> * Start a new mail message and build the text
> this.parent.OleMMess.compose
> lcMessageText="Testing this message"
> this.parent.OleMMess.msgnotetext=lcMessageText
> this.parent.OleMMess.msgsubject="IDP Upload Interface Report"
> this.parent.OleMMess.AttachmentName = "junk.txt"
> this.parent.OleMMess.AttachmentPathName = "C:\junk.txt"
> this.parent.OleMMess.send(1)
>
>When I insert the line below just above the SEND command, it always gives me an error:
> this.parent.OleMMess.RecipAddress="
MVaccarello@IDPNET.COM"
>
>Any ideas? Any help? Documentation is hard to find for this.
>
>Thanks.
>
>Mike Vaccarello
Is this my SendMail you're talking about? If so, it won't come up and show the user the message. To solve your problem, you need to put .recipindex=.recipcount before you put .recipaddress= in your code. Change the send(1) to send(0) and it will send in the background.