AX 2009 attacments inside Lotus Notes richtext

AX 2009 attacments inside Lotus Notes richtext



It is possible using AX 2009 to create email body in Lotus Notes and attach pdf or xls files inside email in needed place providing text for each attached file, and make this embedded objects clickable and possibility to rename them?



enter image description here





Are your email parameters under Administration->Setup->Email Parameters set up?
– manderson
Aug 29 at 15:38





Yes I think, I don't know what you mean
– Dmitrij Holkin
Aug 30 at 5:09





You have to use Notes/Domino APIs. It appears that you're talking about .NET-based product and, I'm not sure whether the standard (i.e., free) Domino interop classes for .NET can get you the precise control of inline positioning of attachments that you want. In Notes mail, the attachment and the icon representing it in the rich text body are actually separate entities, and the standard API classes have limited abilities with rich text. The Notes C API has the capabilities, but it is extremely complex. A third party API called MIDAS from a company called Genii Software is simpler, but not free.
– Richard Schwartz
Sep 1 at 2:26





Can you provide an example please?
– Dmitrij Holkin
Sep 5 at 7:00





This is obviously not a complete guide to using the Notes interop classes from .NET, but take a look at the code in this question. stackoverflow.com/questions/27124953/… And look at the first two answers. This will give you the key class and method names, and if you search on those terms with "C#" you will probably find some additional examples.
– Richard Schwartz
Sep 9 at 16:28





2 Answers
2



Try this job as a test with your file...


static void TestEmails(Args _args)

System.Net.Mail.MailMessage mailMessage;
System.Net.Mail.Attachment attachment;
System.Net.Mail.AttachmentCollection attachementCollection;
System.Net.Mail.SmtpClient smtpClient;
System.Net.Mail.MailAddress emailfrom;
System.Net.Mail.MailAddress emailto;
str messageBody;
str Subject;
str SMTPServer;
str Filenm;
FileIOPermission permission1;

str fileToSend;
;

fileToSend = "P:\Tests\TestFile.pdf";

emailfrom = new System.Net.Mail.MailAddress("From@address.com","");
emailTo = new System.Net.Mail.MailAddress("To@address.com","");

messageBody = "Test Body";
Subject = "Test Subject";
SMTPServer = SysEmailParameters::find(false).SMTPRelayServerName;

mailMessage = new System.Net.Mail.MailMessage(emailfrom, emailTo);

mailmessage.set_Subject(Subject);
mailmessage.set_Body(messageBody);

attachementCollection = mailMessage.get_Attachments();
Filenm = fileToSend;
permission1= new FileIOPermission(Filenm,'w');
permission1.assert();

attachment = new System.Net.Mail.Attachment(Filenm);
attachementCollection.Add(attachment);

smtpClient = new System.Net.Mail.SmtpClient(SMTPServer);
smtpClient.Send(mailmessage);

CodeAccessPermission::revertAssert();





Thanks, exactly this code I have and it do not add files inside email as object but only attach file to email, I need have clickable file inside email body
– Dmitrij Holkin
Aug 30 at 5:11






Curious... why do they have to be in the body? Are these emails for internal use only? Maybe you can send a link to the file.
– manderson
Aug 30 at 15:15





No I need exactly like on picture, as I need Custom Sorting of attachments, as when attachments goes outside body they sorting as they wants but not like I need
– Dmitrij Holkin
Aug 31 at 5:28




There is no way standard AX will do that for you.



You may be able to code it, but it looks tricky.



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)