Ejemplo n.º 1
0
 public static void SendVerifyEmailAddressEmail(ClimberProfile to)
 {
     SMTP.PostSingleMail(
         new CFEmail
     {
         Subject = "Verify your email on Climbfind",
         From    = CFSettings.MailMan,
         To      = new MailAddress(to.Email, to.FullName),
         Body    = CFEmailBodyGenerator.GenerateEmailVerificationBody(to.MessageBoardID, to.Email)
     });
 }
Ejemplo n.º 2
0
 public static void SendCommentOnMyFeedPostNotification(int postID, ClimberProfile userCommenting,
                                                        ClimberProfile userWhoMadePost, string comment)
 {
     SMTP.PostSingleMail(new CFEmail
     {
         Body = CFEmailBodyGenerator.GenerateCommentOnMyFeedPostNotificationBody(userCommenting.FullName, userWhoMadePost.Email,
                                                                                 postID, comment),
         From    = CFSettings.MailMan,
         Subject = string.Format("{0} commented on your post", userCommenting.FullName),
         To      = new MailAddress(userWhoMadePost.Email, userWhoMadePost.FullName)
     });
 }
Ejemplo n.º 3
0
 public static void SendWatchRequestEmail(int watchClimberEntryID, ClimberProfile userSendingRequest,
                                          ClimberProfile userBeingWatched)
 {
     SMTP.PostSingleMail(new CFEmail
     {
         Body = CFEmailBodyGenerator.GenerateWatchRequestBody(userSendingRequest.ID, userSendingRequest.FullName,
                                                              userBeingWatched.Email, userSendingRequest.HisHerString, watchClimberEntryID),
         From    = CFSettings.MailMan,
         Subject = string.Format("{0} wants to know where you climb", userSendingRequest.FullName),
         To      = new MailAddress(userBeingWatched.Email, userBeingWatched.FullName)
     });
 }
Ejemplo n.º 4
0
 public static void SendFeedPostIntroductionNotificationEmail(ClimberProfile userReceivingNotification,
                                                              ClimberProfile userPosting, FeedClimbingPost post, string placeName)
 {
     SMTP.PostSingleMail(new CFEmail
     {
         Body = CFEmailBodyGenerator.GenerateFeedIntroductionPostNotificationBody(placeName,
                                                                                  userPosting.FullName, userPosting.ID, userReceivingNotification.Email, post.Message, post.ID),
         From    = CFSettings.MailMan,
         Subject = string.Format("New climber @ {0}", placeName),
         To      = new MailAddress(userReceivingNotification.Email, userReceivingNotification.FullName)
     });
 }
Ejemplo n.º 5
0
 public static void SendPartnerFeedPostNotificationEmail(ClimberProfile userReceivingNotification,
                                                         ClimberProfile userPosting, FeedClimbingPost post, string placeName)
 {
     SMTP.PostSingleMail(new CFEmail
     {
         Body = CFEmailBodyGenerator.GenerateFeedPartnerPostNotificationBody(placeName, post.ClimbingDateTime,
                                                                             userPosting.FullName, userReceivingNotification.Email, post.Message, post.ID),
         From    = CFSettings.MailMan,
         Subject = string.Format("{0}'s post for {1} @ {2}", userPosting.FullName, post.ClimbingDateTime.ToCFDateString(), placeName),
         To      = new MailAddress(userReceivingNotification.Email, userReceivingNotification.FullName)
     });
 }
Ejemplo n.º 6
0
 public static void SendPartnerCallNotificationEmail(ClimberProfile userReceivingNotification,
                                                     PartnerCall partnerCall, string placeName, string allPlaces, string postersEmail)
 {
     SMTP.PostSingleMail(new CFEmail
     {
         Body = CFEmailBodyGenerator.GeneratePartnerCallNotificationBody(placeName, allPlaces,
                                                                         partnerCall.CreatorFullName, userReceivingNotification.Email, partnerCall.Message, partnerCall.ID),
         From    = CFSettings.MailMan,
         Subject = string.Format("{0}'s partner call for {1}", partnerCall.CreatorFullName, placeName),
         To      = new MailAddress(userReceivingNotification.Email, userReceivingNotification.FullName)
     });
 }
Ejemplo n.º 7
0
        //--------------------------------------------------------------------------------//
        //--------------------------------------------------------------------------------//
        //--------------------------------------------------------------------------------//


        public static void SendReplyToPartnerCall(PartnerCall partnerCall, PartnerCallReply reply,
                                                  ClimberProfile replyer, string replyersEmail, string postersEmail)
        {
            SMTP.PostSingleMail(new CFEmail
            {
                Body = CFEmailBodyGenerator.GenerateReplyToPartnerCallBody(reply.ReplyingUserID,
                                                                           replyer.FullName, replyersEmail, partnerCall.CreatorFullName, postersEmail, reply.Message),
                From    = new MailAddress(replyersEmail, reply.ReplyingName),
                Subject = "Climbfind: Reply to your partner call from " + reply.ReplyingName,
                To      = new MailAddress(postersEmail, partnerCall.CreatorFullName)
            });
        }
Ejemplo n.º 8
0
        public static void SendMessageBoardNotification(ClimberProfile userWrittenOnBoard, ClimberProfile messageBoardOwner)
        {
            string toEmail = messageBoardOwner.Email;

            SMTP.PostSingleMail(
                new CFEmail
            {
                Subject = string.Format("{0} posted a message on your message board", userWrittenOnBoard.FullName),
                From    = CFSettings.MailMan,
                To      = new MailAddress(toEmail, messageBoardOwner.FullName),
                Body    = CFEmailBodyGenerator.GetMessageBoardNotificationBody(userWrittenOnBoard.FullName, messageBoardOwner.Email)
            });
        }
Ejemplo n.º 9
0
        public static void SendMessageboardNotificationEmail(ClimberProfile from, ClimberProfile to, string message)
        {
            string toEmail = to.Email;

            SMTP.PostSingleMail(
                new CFEmail
            {
                Subject = string.Format("{0} posted a message on your message board", from.FullName),
                From    = CFSettings.MailMan,
                To      = new MailAddress(toEmail, to.FullName),
                Body    = CFEmailBodyGenerator.GetUserMessageboardNotificationBody(from.ID, from.FullName, to.Email, message)
            });
        }
Ejemplo n.º 10
0
        public static void SendUserMessageEmail(ClimberProfile from, ClimberProfile to, string subject, string message,
                                                Guid msgID)
        {
            string toEmail = to.Email;

            SMTP.PostSingleMail(
                new CFEmail
            {
                Subject = string.Format("{0} sent you a message on Climbfind", from.FullName),
                From    = CFSettings.MailMan,
                To      = new MailAddress(toEmail, to.FullName),
                Body    = CFEmailBodyGenerator.GetUserMessageBody(from.ID, from.FullName, to.Email, subject, message, msgID)
            });
        }
Ejemplo n.º 11
0
        public static void SendCommentOnAFeedPostICommentedOnNotification(int postID, ClimberProfile userCommenting,
                                                                          ClimberProfile userWhoMadePost, ClimberProfile userOriginallyCommented, string comment)
        {
            string postersOwnerName = userWhoMadePost.FullName + "'s";

            if (userWhoMadePost.ID == userCommenting.ID)
            {
                postersOwnerName = "their";
            }

            SMTP.PostSingleMail(new CFEmail
            {
                Body = CFEmailBodyGenerator.GenerateCommentOnAFeedPostICommentedOnNotificationBody(userCommenting.FullName,
                                                                                                   userWhoMadePost.FullName, postersOwnerName, userWhoMadePost.Email, postID, comment),
                From    = CFSettings.MailMan,
                Subject = string.Format("{0} also commented on {1} post", userCommenting.FullName, postersOwnerName),
                To      = new MailAddress(userOriginallyCommented.Email, userOriginallyCommented.FullName)
            });
        }