How can I trigger a email to my email id using service callout

i am having a struggle understanding how to send email id as url in service callout.Need to give username password as a payload is it?

Need to give port also...

0 13 813
13 REPLIES 13

Do you have a HTTP based mail service?

You cannot use a smtp service or an email id in a service callout.

Can i convert my mail id to a url?

you can't, Service callout only support HTTP and HTTPS protocol as of now so you need yo send data as an API call to some mail server which can process your main service.

I have a google account..

As Ravindra mentioned, service callouts only support HTTP and HTTPS protocols. There's no way to directly email from Apigee although there's probably a nodejs module for using an SMTP service.

You can learn more about SMTP here https://tools.ietf.org/html/rfc5321

You could look into a mail service that has a rest API. With that said, what is your use case for sending emails? Why are you building this as part of an API Proxy?

My usecase is simple.I want to put my email id in kvm .I want to access it and send email to it...

Can i dynamically assign it in service call out?

Does google mail has api based service?

Which APi based email u suugest then?

@Vinod Mehta If your use-case is to send emails when an error occurs (as asked in the question you've linked to in a comment above), I suggest thinking about the solution in a different way. This requirement is more of an operational concern rather than an API implementation topic, meaning an API proxy is the wrong place to build this.

You should look into using Apigee's API Monitoring feature which allows you to configure alerts with email or webhook notifications. Alternatively, you could configure a separate service or application, outside of Apigee, that periodically interrogates Apigee's Analytics API for response codes (or other data you're interested in). Please read through the documentation and ensure you understand the capabilities before making assumptions and decisions that will influence your solution.

As a side note, in future, please share details of your use-case and/or requirements when asking a question. This will greatly help the community provide better support to you.

I am not looking for error issues. Just basic email from service call out to api based email service..

Consider using a commercial Mail API provider, which offer a REST endpoint to do what you need.

Example:

https://restdb.io/docs/mail-api

What would be the service call out code be like?

Does it have a username and password than can be stored in kvm?

Can i use hotmail or yahoo?