Hi all
I have a scenario of sending a mail from the appover when he tries to approve a document(India Localization).To address the above scenario, i had used the MAPI Handler which is not giving the client satisfaction.
Now i am trying to send that approval mail by using SMTP which was addressed in 5.0 n not in 4.0.I am using the JMail to meet the requirement.I am making use of the below said sample code to send an sample mail for testing purpose and i am unable to do it.
sample code :
IF ISCLEAR(JMailB) THEN
CREATE(JMailB);
JMailB.Logging := TRUE;
JMailB.From('<from>
@b2bsoftech.com');
JMailB.FromName('Shiva');
JMailB.AddRecipient('<To>
@b2bsoftech.com');
JMailB.Subject('Indent Approval');
JMailB.AppendText('');
JMailB.AppendText('');
JMailB.HTMLBody('<a href=' + 'Test' + '</a>');
JMailB.AppendText('');
OK := JMailB.Send('mail.b2bsoftech.com');
IF NOT OK THEN BEGIN
TxtError := JMailB.ErrorMessage;
MESSAGE('Error: %1',TxtError);
END;
MESSAGE('ok = %1',FORMAT(OK));
JMailB.Close;
Which is giving me the error(checkout the attchment).
Off-Course i am having the complete access to the SMTP Server.
Comments
Try to comment out JMailB.HTMLBody('<a href=' + 'Test' + '</a>');
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I am trying to send an Text E-Mail.
********
Friend Ship is just like breeze.. you can't smell it, touch it,hold it.
********
********
Friend Ship is just like breeze.. you can't smell it, touch it,hold it.
********
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks for your valuable suggestions.I am able to send the mail using the JMail.
Could any one tell me the code to move to the next line in the body section of the Mail.
My body section should appear as below
Dear Sir,
PI-0910-0020is approved and ready to order
Thanks & Regards
xxxxxxxxxx
Bosy section is appearing as
Dear Sir,PI-0910-0020is approved and ready to orderThanks & Regardsxxxxxxx
********
Friend Ship is just like breeze.. you can't smell it, touch it,hold it.
********
Try this: