Interested in creating and selling training? You pick the price, 50/50 revenue share, and you own the content. Find out more at
I would like to send a mail through smtp (using NAS).
I would prefer not to install any external components just use a Navision component and specify the smtp server and send the message.
Anybody knows if navision has a standard component for this and the commands ??
kml: I would like to send a mail through smtp (using NAS). I would prefer not to install any external components just use a Navision component and specify the smtp server and send the message.
Hi,
You don't need to install anything because SMTP is a network service native to Windows. You simply add two OCXs as C/AL Global Variables:
Navision is only an application running on top of all these Windows and network services. Though you could use Outlook Object Model to achieve the same, I would suggest that you stick w/ Windows native service.
However you will always get this warning: "A program is trying to automatically send e-mail on your behalf. Do you want to allow this?" and there is no way to turn it off. You can learn more about MAPI in Microsoft KB and MSDN.
Scott
I have used the MAIL codeunit to send email. However, I need a session with outlook to send email. But the result is okay.
Richard
I finally ended up sending smtp directly from navision just using standard MS components
and it works fine and do not prompt if you want to send mail and do not need outlook client installed but going directly on the smtp server.
I have not checked out the standard SMTP features which are now shipped in NAV 5.0
Is it possible now possible to send a mail with HTML content embedded in the body "out-of the box", that's without using any 3rd party component
(I'm not talking about file attachment here but a mail body in HTML)
Tarek Demiati said: I have not checked out the standard SMTP features which are now shipped in NAV 5.0 Is it possible now possible to send a mail with HTML content embedded in the body "out-of the box", that's without using any 3rd party component (I'm not talking about file attachment here but a mail body in HTML)
yes you can.
Hello Muno,
How would you do that, I did check CU400 and I've not found the property which allows me embedding my HTML file into the body
I tried this :
CLEAR(CU400);
// CU400.CreateMessage(SenderName,SenderAddress,Recipients,Subject,Body,HtmlFormatted) CU400.CreateMessage('test@mydomain.com','test@mydomain.com','mybizpartner@foo.com,'SUBJECT', 'C:\MYDOC.HTM', TRUE);CU400.Send;
BTW : MYDOC.HTM links to some pictures and logos
hai Tarek Demiati...i try your code but i got one error message." SMTP Mail setup primary key does not exist"..then i try also AppendBody function to load txt or html file..so please help me...
Did you set your SMTP Server credentials(?) at
Administration-->IT Administration-->General Setup-->SMTP Mail Setup
hi mohana now only i set the SMTP server name,but again i got another error..i think my SMTP server name is wrong.k thanks for your reply..
Hi there,
I'm testing the JMail solution, and it almost works fine.
The problem is, I cannot send emails with more than 1024 characters in the body.
The error message that shows up is something like (translated from portuguese): "The size of the text exceeds the size of internal text memory."
I think I have tried everything I can remember. I used the AppendText method. I used the AppendBodyFromFile method. None of them work
Am I missing something?
try this http://dynamicsuser.net/blogs/nunomaia/archive/2007/09/10/running-smtp-component-from-nav-5-0.aspx
Well we have used the CU of NAV 5 related to SMTP and imported in NAV 4 SP3 version & copied the required DLL in the NAV folder and registerd them, which are still working fine.
Thanks guys.
Thanks
Uploaded In
http://www.mibuso.com/dlinfo.asp?FileID=1527
Regards,
Sami