Sending mails through a custom form

I have a form that I am trying to send as an email after it is saved. I have the field names as those on the memo form (the email fields that are required). I have tested this and some times the emails go through and other times, emails are not being received in the inbox of the people in the sendto field as well as the CopyTo and BlindCopyTo.

When I go to track the message it says that it is delivered. When it is sent to someone in our company, I can go to their mailbox and can not find the message.

Any help would be appreciated!

Jamie

here is the code:

REM {Set the required fields here};

@If(SendTo = “”; @Prompt([Ok]; “Missing Data”; “Please select or enter the person whom this document needs to go to.”); @Success);

@If(SendTo = “”; @Return(“”); @Success);

@If(Subject = “”; @Prompt([Ok]; “Missing Data”; “Please enter the subject of the document”); @Success);

@If(Subject = “”; @Return(“”); @Success);

@Command([FileSave]);

@Command([FileSave]);

REM {Send the email to the recepient};

@If(@IsDocBeingSaved; @Do(@Command([FileSave]; @Command([MailSend]))); @Do(@Command([FileSave]; @Command([MailSend]))));

@PostedCommand([FileCloseWindow])

Subject: sending mails through a custom form

You have a lot of saving and sending in here. I’m assuming this code is from an action. Try this:

@If(SendTo = “”; @Return(@Prompt([Ok]; “Missing Data”; “Please select or enter the person whom this document needs to go to.”)); “”);

@If(Subject = “”; @Return(@Prompt([Ok]; “Missing Data”; “Please enter the subject of the document”)); “”);

@Command([FileSave]);

@Command([MailSend]);

@Command([FileCloseWindow])

Subject: RE: sending mails through a custom form

thanks. That was the orginal code I had, but it was not working for some reason. I will try this agian.