Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: calendar invitation for rackspace Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
namanpratyush
Newbie
Newbie
Avatar

Joined: 13 April 2015
Location: United States
Online Status: Offline
Posts: 3
Posted: 13 April 2015 at 1:56pm | IP Logged Quote namanpratyush

Hi all,

I am trying to send calendar invitation to users from outlook, gmail and rackspace. I am able to send invitation to outlook and gmail, however I am unable to send it to rackspace account. Please identify my mistake

code snippet:

       public struct VCalendar
        {
            public int year, month, day, hour, minute, second, duration;
            public string summary, location, method, going;
        }
static string CreateCalendarRecord(VCalendar calEvent)
        {

            string calRecord;
            calRecord = "BEGIN:VCalendar" + Environment.NewLine;
            calRecord += "METHOD:" + calEvent.method + Environment.NewLine;
            calRecord += "BEGIN:VEVENT" + Environment.NewLine;
            calRecord += "DTSTART:" + calEvent.year.ToString("0000") + calEvent.month.ToString("00") + calEvent.day.ToString("00");

            calRecord += "T" + calEvent.hour.ToString("00") + calEvent.minute.ToString("00") + calEvent.second.ToString("00") + "Z" + Environment.NewLine;

            calEvent.hour += calEvent.duration;
            calRecord += "DTEND:" + calEvent.year.ToString("0000") + calEvent.month.ToString("00") + calEvent.day.ToString("00");

            calRecord += "T" + calEvent.hour.ToString("00") + calEvent.minute.ToString("00") + calEvent.second.ToString("00") + "Z" + Environment.NewLine;

       
            calRecord += "LOCATION:" + calEvent.location + Environment.NewLine;
            calRecord += "SUMMARY:" + calEvent.summary + Environment.NewLine;

            // Calculate unique ID based on current DateTime and its MD5 hash
            string strHash = string.Empty;
            foreach (byte b in (new System.Security.Cryptography.MD5CryptoServiceProvider()).ComputeHash(System.Text.Encoding.Default.GetBytes(DateTime.Now.ToString())))
            {
               strHash += b.ToString("X2");
            }
            calRecord += "UID:" + strHash + Environment.NewLine;
            calRecord += "END:VEVENT" + Environment.NewLine;
            calRecord += "END:VCalendar";
            return calRecord;
        }
VCalendar calEvent = new VCalendar();
            calEvent.summary = "Meeting to discuss the new project";
            calEvent.location = "NY Office";
            calEvent.year = 2015;
            calEvent.month = 12;
            calEvent.day = 12;
            calEvent.hour = 12;
            calEvent.minute = 20;
            calEvent.second = 59;
            calEvent.duration = 1;
            calEvent.method = "REQUEST";

Smtp.LicenseKey = "MN900-BC7474F27492741B74FEBF786135-2471";

Smtp mailer = new Smtp();

            mailer.Message.From.Email = "someemail@gmail.com";
            mailer.Message.To.Add("someemail@rackspace.com");
            mailer.Message.Subject = "Meeting Request";

   mailer.Message.BodyParts.Add("text/calendar; method=\"REQUEST\"").Text = CreateCalendarRecord(calEvent);

   mailer.SmtpServers.Add("smtp.gmail.com", "somemail@gmail.com", "somepassword");
            mailer.SmtpServers[0].SmtpOptions = ExtendedSmtpOptions.NoChunking;

mailer.Send();


Regards,
Naman Pratyush
Back to Top View namanpratyush's Profile Search for other posts by namanpratyush
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 14 April 2015 at 8:13am | IP Logged Quote Igor

To help you with that, we need to know what exactly is the problem. Do you get any exceptions? Is there anything relevant in the logs? Those are enabled as shown here. You can send us the logs for examination via HelpDesk.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
namanpratyush
Newbie
Newbie
Avatar

Joined: 13 April 2015
Location: United States
Online Status: Offline
Posts: 3
Posted: 14 April 2015 at 10:54am | IP Logged Quote namanpratyush

Hi,

I bought a License Key for MailBee.NET Objects. I am trying to send calendar invitation to users belonging to outlook, gmail and rackspace account. I am able to send invitation to outlook and gmail user's email address, however I am unable to send it to rackspace account user. Please let me know if the code is correct or not. If not, can you please provide me the correct code snippet.


Regards,
Naman Pratyush
Back to Top View namanpratyush's Profile Search for other posts by namanpratyush
 
namanpratyush
Newbie
Newbie
Avatar

Joined: 13 April 2015
Location: United States
Online Status: Offline
Posts: 3
Posted: 14 April 2015 at 10:55am | IP Logged Quote namanpratyush

I forgot to say, I am not getting any exception. Do you guys provide call support.
Back to Top View namanpratyush's Profile Search for other posts by namanpratyush
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 14 April 2015 at 12:51pm | IP Logged Quote Alex

Standard support does not include writing the code for clients or fixing bugs in their code, it's limited to answering questions. If you would us to write code for you or refactor/improve it for any purpose, this can be done by our Professional Services team.

For Corporate support and prof. services options, please write us at http://www.afterlogic.com/helpdesk

In standard support scope, I can suggest you perform normal debug procedure (which is not even specific to MailBee). For instance, your code is very big, you first need to reduce it to the most simplest code at which the bug still occurs. How can we tell what's wrong with your code when it's big, does a lot of things and the only thing you can tell is that it doesn't work as expected?

So, to conclude:
- be sure to make the simplest version possible (I think it can be 5-6 times shorter than you have now, not longer than 10 lines of code)
- check the logs as Igor explained
- tell what exactly is wrong and what exactly the problem is
- if from the logs you see that email is sent just fine - i.e. you get no error but the email just never appear in rackspace account, then it may indicate it ends up in spam folder or something like that (and this is to be discussed with rackspace, why they treat your email as spam).

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide