Click here to Skip to main content
15,397,084 members

Mahesh_Bhosale - Professional Profile



Summary

    Blog RSS
50
Author
900
Authority
17
Debator
10
Editor
98
Enquirer
1,113
Organiser
299
Participant
No Biography provided

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralSending SMTP Email Through Office365 Pin
Mahesh_Bhosale14-Oct-13 23:23
MemberMahesh_Bhosale14-Oct-13 23:23 
Requirements for Sending mail via Office 365
The application must connect to the Office 365 servers, with port 587
The application must support TLS(Encryption method)
The application must authenticate with Office 365
The account you authenticate to the server with must be the same account as the from address on the mail you send through the Office365.

Code:
C#
using System;
using System.Web.UI;
using System.Net.Mail;

 protected void btnSend_Click(object sender, EventArgs e)
        {
            try
            {
                if (SendMail() == true)
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "alert('Mail send sucessfully.')", true);
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "alert('Sending Failed.')", true);
                }
            }
            catch (Exception ex)
            {
            }
        }

        private bool SendMail()
        {
            try
            {
                SmtpClient oSmtpClient = new SmtpClient("smtp.office365.com",587);
                oSmtpClient.EnableSsl = true;// EnableSsl to true so you can connect via TLS
                System.Net.NetworkCredential cred = new System.Net.NetworkCredential("youroffice365mail@mail.org", "Your Password");
                oSmtpClient.Credentials = cred;
                MailMessage oMailMessage = new MailMessage();
                oMailMessage.From = new MailAddress("youroffice365mail@mail.org","User Name");//User name optional
                oMailMessage.To.Add("recipientmail@mail.com");
                oMailMessage.Subject = "Subject";
                oMailMessage.Body = "Mail Body";
                oSmtpClient.Send(oMailMessage);
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }

MaheshUBhosale

GeneralRe: Sending SMTP Email Through Office365 Pin
ABCPQR00114-Oct-13 23:31
MemberABCPQR00114-Oct-13 23:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.