1. Milton Jiménez
  2. SnapDevelop
  3. Wednesday, 16 October 2019 02:22 AM UTC

Hi , Friends

Now that PowerBuilder can consume api rest; Some example of consumption of an API for sending mass emails;

ow that PowerBuilder can consume api rest; Some example of consumption of an API for sending mass emails;

 

Michael Kramer Accepted Answer Pending Moderation
  1. Wednesday, 16 October 2019 08:33 AM UTC
  2. SnapDevelop
  3. # 1

Hi Milton, I see a wide, empty void where I suppose your code example was supposed to be.

Can you check that it looks fine for yourself?
Sometimes [Code] formatting throws away chunks of code when it contains less-than . . . greater-than combos.

HTH /Michael

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 17 October 2019 13:38 PM UTC
  2. SnapDevelop
  3. # 2

What REST API are you trying to consume?

Comment
  1. Milton Jiménez
  2. Thursday, 17 October 2019 20:44 PM UTC
Hi,

I am using an dll in c# with smtp for send mail since my app;

If instead of using the dll; I will generate a Web API from this code.

How do I implement it?



which of the two would be more efficient dll or apiweb?



private void sendEmail()

{

string subject = ";

string body = "";

string FromMail = "";

string emailTo = "";

MailMessage mail = new MailMessage();

SmtpClient SmtpServer = new SmtpClient("mail);

mail.From = new MailAddress(FromMail);

mail.To.Add(emailTo);

mail.Subject = subject;

mail.Body = body;

SmtpServer.Port = 25;

SmtpServer.Credentials = new System.Net.NetworkCredential("mail", "your password");

SmtpServer.EnableSsl = false;

SmtpServer.Send(mail);

}

  1. Helpful
  1. Kevin Ridley
  2. Wednesday, 23 October 2019 12:44 PM UTC
Sorry for the delay in replying, was trying to find this post. Looks like what you are actually trying to do is CREATE a REST API not consume one. I would start here:

https://docs.appeon.com/appeon_online_help/snapdevelop2019/Create_a_Web_API/index.html
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 23 October 2019 18:50 PM UTC
  2. SnapDevelop
  3. # 3

Hi Milton;

  We cannot advise you on this question as we do not know what Web Service interface(s) & their details that you will be using. We would need a lot more specifics as each Mail Server can vary.

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.