Re: [google-appengine] Re: GAE Web app sending mail using SendGrid

2020-07-15 Thread Adam Jack
I don't know the background here, but in case any of this helps:

Do you have an API key from SendGrid?

   https://app.sendgrid.com/settings/api_keys

In your appengine-web.xml  set the environment variable to pass that API
key into:


  




https://cloud.google.com/appengine/docs/standard/java/config/appref


Sorry if I am off base, it just looks similar to what I am doing (with Go.)


regards,

Adam

On Wed, Jul 15, 2020 at 6:20 AM Alexis CAPGEMINI <
alexis.capgem...@radiall.com> wrote:

> Can you please explain how you did this ?
>
> I'm still stuck with an error here :  SendGrid sendgrid = new
> SendGrid( System.getenv("SENDGRID_SENDER"));
>
> Thanks
>
> Le vendredi 7 septembre 2018 à 18:02:44 UTC+2, rashmi...@gmail.com a
> écrit :
>
>> I have solved the problem. I had to use Urlfetch configuration in
>> appengine-web.xml and use URLFetch class instead of HttpURLConnection. It
>> works now. Thanks for the help!
>>
>>
>> On Saturday, August 25, 2018 at 1:08:16 AM UTC+5:30, George (Cloud
>> Platform Support) wrote:
>>>
>>> If you would like us to look more in-depth in the issue, you should
>>> write a private message with your project ID. You can do this using the
>>> drop-down menu of the reply button, at the top-right of the message window.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/21e0c86a-886a-491b-a57d-cd4d72b4e02cn%40googlegroups.com
> 
> .
>


-- 
Responserack
- incidents happen, response is crafted...
https://www.responserack.com | LinkedIn
 | Facebook
 | Twitter


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAMT-FFKdRnu8Ajr5CrdCXCYf9Uk-OsecionwZfcP2NBRLnj1_Q%40mail.gmail.com.


Re: [google-appengine] Re: GAE Web app sending mail using SendGrid

2020-07-15 Thread Alexis CAPGEMINI
Can you please explain how you did this ?

I'm still stuck with an error here :  SendGrid sendgrid = new SendGrid( 
System.getenv("SENDGRID_SENDER"));  

Thanks

Le vendredi 7 septembre 2018 à 18:02:44 UTC+2, rashmi...@gmail.com a écrit :

> I have solved the problem. I had to use Urlfetch configuration in 
> appengine-web.xml and use URLFetch class instead of HttpURLConnection. It 
> works now. Thanks for the help!
>
>
> On Saturday, August 25, 2018 at 1:08:16 AM UTC+5:30, George (Cloud 
> Platform Support) wrote:
>>
>> If you would like us to look more in-depth in the issue, you should write 
>> a private message with your project ID. You can do this using the drop-down 
>> menu of the reply button, at the top-right of the message window. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/21e0c86a-886a-491b-a57d-cd4d72b4e02cn%40googlegroups.com.


Re: [google-appengine] Re: GAE Web app sending mail using SendGrid

2018-09-07 Thread Rashmi S
I have solved the problem. I had to use Urlfetch configuration in 
appengine-web.xml and use URLFetch class instead of HttpURLConnection. It 
works now. Thanks for the help!

On Saturday, August 25, 2018 at 1:08:16 AM UTC+5:30, George (Cloud Platform 
Support) wrote:
>
> If you would like us to look more in-depth in the issue, you should write 
> a private message with your project ID. You can do this using the drop-down 
> menu of the reply button, at the top-right of the message window. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/06cd5731-637a-453b-b0a5-cbc1de942927%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-24 Thread 'George (Cloud Platform Support)' via Google App Engine
If you would like us to look more in-depth in the issue, you should write a 
private message with your project ID. You can do this using the drop-down 
menu of the reply button, at the top-right of the message window. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/1298df25-f2ef-460b-b4a7-ab25118cc2a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-24 Thread Rashmi S
Yes, I did.

On Fri, Aug 24, 2018 at 12:34 AM 'George (Cloud Platform Support)' via
Google App Engine  wrote:

> Have you followed each and every step listed in "Preparing the
> application" sub-chapter
> 
>  of
> the SendGrid tutorial?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/6dc115d3-5f3f-4ba2-a8cd-98d874b716f3%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CANH0Qgr_wRu_znGDmUr%2BBzyAn_UhOY_TwBVh1o4FwYQPt%2BTYGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-23 Thread 'George (Cloud Platform Support)' via Google App Engine
Have you followed each and every step listed in "Preparing the application" 
sub-chapter 

 of 
the SendGrid tutorial?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/6dc115d3-5f3f-4ba2-a8cd-98d874b716f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-20 Thread 'George (Cloud Platform Support)' via Google App Engine
There are a lot of advantages offered by SendGrid to free account holders. 
You may check details on the SendGrid pricing page 
. Payment detail are not requested on that 
page. 

How did you get your application ready? You are encouraged to read the 
"Preparing the application" sub-chapter 

 
of the SendGrid tutorial. Have you followed each and every step listed on 
that page? 

You seem to need help for a coding issue; it may be worth mentioning: this 
is a tracker for Cloud SDK specific issues. When it comes strictly to 
programming and coding, you’ll be at an advantage to rather post your 
questions on Stackoverflow, to gain this way access to a large number of 
experts; Stackoverflow and other similar forums are meant to provide help 
with coding. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ef9b1f09-1a47-412d-b186-2fa80573e89e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-20 Thread Rashmi S
Just want to confirm, is updation of billing account necessary even for free 
trial versions of sendgrid or mailjef. Will it not work without payment 
details? And could it be possible that these services, even recaptcha is 
failing with an IOexception or server error?...with reference to this doc: 
https://cloud.google.com/appengine/docs/standard/java/issue-requests#java_8_runtime_vs_java_7_behavior
 . Can anyone clarify..

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/c34faf2f-d564-434b-9823-e8e0e034284f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-15 Thread 'George (Cloud Platform Support)' via Google App Engine
At this stage, we'll need your project ID for closer and more in-depth 
inspection. As this is private information, you should send it by private 
message, using the drop-down menu of the "reply" button at the top right of 
a posting window. 

It may be worthile mentioning here that this discussion group is oriented 
more towards general opinions, trends and issues of general nature touching 
the app engine. For coding and programming architecture, you are better 
served in a forum such as stackoverflow, where experienced programmers are 
within reach and ready to help. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/07b2e1f9-7113-475a-af2c-b27aa137b128%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-14 Thread Rashmi S
Hi George, thanks for the reply!

My project is a spring MVC project. I'm using a trial version of Sendgrid. I 
haven't updated my billing details(could this be a reason for failure).
Here's the relevant code snippet :

Method 1:
public static boolean sendEmail(String emailId) {

Sendgrid mail = new Sendgrid("my_username","my_password"); //Input: 
SendGrid username, password
mail.setTo(emailId) //to ID
.setFrom("my_email...@gmail.com") //from ID
.setSubject("Sending first mail with Sendgrid") //subject
.setText("thanks for subscribing!"); //content

try {
mail.send();
}
catch (JSONException e) {
logger.info("JSON exception occured");
return false;
 }
return true;
}

Method 2: I've tried the version that uses Api key too:
 
Email from = new Email("my_emai...@gmail.com");
String subject = "Sending first mail with Sendgrid";
Email to = new Email(emailId);
Content content = new Content("text/plain", "thanks for subscribing!");
Mail mail = new Mail(from, subject, to, content);

SendGrid sg = new SendGrid(SENDGRID_API_KEY);
Request request = new Request();
request.setMethod(Method.POST);
request.setEndpoint("mail/send");
request.setBody(mail.build());
Response response = sg.api(request);

if(response.getStatusCode()!=200) {
logger.info("response status is ", response.getStatusCode());
return false;
}


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/708a33a1-44b1-4d39-bcb5-3b17aba13b0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-14 Thread Rashmi S
Hi George, thanks for the reply!

My project is a spring MVC project. I'm using a trial version of Sendgrid. I 
haven't updated my billing details(could this be a reason for failure).
Here's the relevant code snippet :

Method 1:
public static boolean sendEmail(String emailId) {

Sendgrid mail = new Sendgrid("my_username","my_password"); //Input: 
SendGrid username, password
mail.setTo(emailId) //to ID
.setFrom("my_email...@gmail.com") //from ID
.setSubject("Sending first mail with Sendgrid") //subject
.setText("thanks for subscribing!"); //content

try {
mail.send();
}
catch (JSONException e) {
logger.info("JSON exception occured");
return false;
 }
return true;
}

Method 2: I've tried the version that uses Api key too:
 
Email from = new Email("my_emai...@gmail.com");
String subject = "Sending first mail with Sendgrid";
Email to = new Email(emailId);
Content content = new Content("text/plain", "thanks for subscribing!");
Mail mail = new Mail(from, subject, to, content);

SendGrid sg = new SendGrid(SENDGRID_API_KEY);
Request request = new Request();
request.setMethod(Method.POST);
request.setEndpoint("mail/send");
request.setBody(mail.build());
Response response = sg.api(request);

if(response.getStatusCode()!=200) {
logger.info("response status is ", response.getStatusCode());
return false;
}


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/dd9c1821-022e-428b-993f-91276ad12f9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-14 Thread Rashmi S
Yes, authentication works well.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/fa1dc160-073b-47a4-b013-bb0b0c044ed7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GAE Web app sending mail using SendGrid

2018-08-14 Thread 'George (Cloud Platform Support)' via Google App Engine
Hello Rashmi, 

Have you followed all steps in the referred document? Authentication works 
well? How does your email-related code looks like? A sample of your code 
would greatly help in setting the basis of further investigations. You may 
consider having a look at the SendGrid Tutorial 
, to make sure 
you have covered all needed steps, to secure full functionality in the 
deployed app. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ee9c16f3-195c-49bd-9469-e0caa3a4da9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.