-1

I'm a pretty new to C# and am much more familiar with Python. But interfacing with a couple programs is more straightforward with C# so I'm attempting to do what I want with it instead of Python.

I've created a Python application that uses SMTP, but I would really like to leverage the Google Calendar API. When I find C# code examples on how to write it, I'm confused as to what needs to be setup for it to work. Where does the authorization come from? A google app?

I would like a console application that can be run by another program which will send an email (or event invitation) to an Business Google account (in-house, co-workers). I'm lost as to where I need to start. What are the different things I need to accomplish this? I'm confused about whether I need to make a Google App and how to navigate what is involved in authentication, or whether I even need it. I didn't think authentication should be necessary except for the login in and password of the account I'm sending it from. Some direction would be appreciated...

Further Edit: Didn't know an iCal can accomplish an invite, most of the examples seemed to be for Outlook. That might work.

But knowing I can set it up through the business account it superb, thanks...

cndnflyr
  • 163
  • 2
  • 14
  • Google Calendar invites are just iCal attachements. You can do this with just the SMTP client built into .NET and something like DDay.iCal package. – Matt Jan 23 '15 at 16:32
  • Everyone has to start somewhere - why do a down vote for someone asking for help? – Tab Jan 23 '15 at 16:39
  • @Tab not the downvoter, but if you look at the tool tip on the downvote it says "does not show research effort". I think, as written, this question qualifies. – crthompson Jan 23 '15 at 16:42
  • I'll clarify the question to show what I have looked at already. But I thought a concise question would be more appreciate, I guess not... – cndnflyr Jan 23 '15 at 16:45
  • @paqogomez - hmm - I guess I agree to some extent. Sometimes it's hard to know where to start when just beginning. Point taken. Thanks! – Tab Jan 24 '15 at 14:37

1 Answers1

1

You don't need to make a Google app - if you have the account information for the Business account then you have the ability to use google's smtp server (your smtp server) to send email given that you have credentials - came concept as if you set up a desktop mail program to send and receive gmail.

Looks like this other stackoverflow question may help you out in the actual sending of the email: Send e-mail via SMTP using C#. Here is another article that looks more step by step: http://forum.codecall.net/topic/65295-c-sending-email-through-smtp/

If it was me: 1. Get the credentials 2. Create .Net app to build and send an email - I would make the console app allow command line arguments as well. DotNetPearls is a great site for quick reference and has an introduction to cmd line with C#: http://www.dotnetperls.com/main

Hope this helps - just happened to see the question and realized I have been down this road before

Community
  • 1
  • 1
Tab
  • 1,702
  • 2
  • 19
  • 39