Create filter throug c#

187 views
Skip to first unread message

pradeep

unread,
Sep 21, 2011, 10:08:17 AM9/21/11
to Google Apps Domain Information and Management APIs
Hi,

I am developing a application blocking a sender in gmail filter
through c#.net. I am a using gmail api to block a sender using the
following line,

GoogleMailSettingsService service = new
GoogleMailSettingsService("yourdomain", "your-apps");

what is "yourdomain" and "your-apps" fields.

service.setUserCredentials(adminEmail, adminPassword);

what is adminEmail and adminPassword.

service.CreateFilter(testUserName, "", "", "important", "", "", "",
"", "", "", "true", "true", "", "");
Here what is testUserName.

Or

Kindly advice how to block a sender in gmail thorough a c#.net code.


we given credentials:

domain = "google.com";
adminEmail = "eminosof...@gmail.com";
adminPassword = "xxxxxx";
testUserName = "harinathes";

GoogleMailSettingsService service = new
GoogleMailSettingsService(domain,"googlemailsettingsdemo");
service.setUserCredentials(adminEmail, adminPassword);

service.CreateFilter("eminosoft.pradeep","",
"haridot...@gmail.com", "", "", "", "", "", "true", "true");

we got an error occured is:
Execution of request failed:
https://apps-apis.google.com/a/feeds/emailsettings/2.0/google.com/eminosoft.pradeep/filter

Jay Lee

unread,
Sep 21, 2011, 10:22:01 AM9/21/11
to google-app...@googlegroups.com
Hi pradeep,

  The Email Settings API only works for Google Apps for Business and Education domains. It cannot be used for @gmail.com accounts.

Jay

Eminosoft Pradeep

unread,
Sep 21, 2011, 11:50:16 AM9/21/11
to google-app...@googlegroups.com
Actually we are using the gmail accounts(for example pra...@gmail.com,hari...@gmail.com). What we need to do work with Email Setting API for gmail. Do we need to buy any domain?.Could you please guide us.
 
Thanks in advance...
Pradeep.

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/HOShvdLXEgMJ.
To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.



--
Thanking you.


Regards
T.Pradeep Kumar
Software Engineer
Eminosoft India Pvt.Ltd
Ph: 91-9848023239
Home Page : www.eminosoft.com

 
(This e-mail contains information from Eminosoft, which may be privileged or confidential. The information is for the intended individual(s) or entity named above. If you are not the intended recipient be aware that any copying, disclosing, distribution or use of the above email and/or its attachments is prohibited and is illegal. If you have received this electronic message in error, please notify us by telephone or email (to the numbers or address above) immediately. This e-mail is not un-solicited e-mail under the relevant regulations)

Jay Lee

unread,
Sep 21, 2011, 11:53:06 AM9/21/11
to google-app...@googlegroups.com
Hi pradeep,

  There is no way to use the Email Settings API for gmail.com accounts. You will not be able to create filters for Gmail consumer users.

Jay

Eminosoft Pradeep

unread,
Sep 23, 2011, 9:33:43 AM9/23/11
to google-app...@googlegroups.com
Hi,
 
 We want to use Email Settings API for create filters in my bussiness application. What we need to do? If is there any process using this api. Please specify clearly we are ready to move any further steps


Jay

--
You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group.

To post to this group, send email to google-app...@googlegroups.com.
To unsubscribe from this group, send email to google-apps-mgmt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Gunjan Sharma

unread,
Sep 23, 2011, 12:41:51 PM9/23/11
to google-app...@googlegroups.com
Hello Pradeep

The feature that you are looking for is already available in Email Settigs API. Here is the link you can refer to. You can also use the API using the Client Libraries which you can download from here (for python). These libraries are also available in .Net and Java.

Thanks
Gunjan Sharma

Gunjan Sharma

unread,
Sep 23, 2011, 12:54:58 PM9/23/11
to google-app...@googlegroups.com
Hey Pradeep

I again looked in to your question. You cannot use Email Settings on @gmail.com accounts. It is only meant for Google apps for Business and Education domain.

Thanks
Gunjan Sharma
Reply all
Reply to author
Forward
0 new messages