Click here to Skip to main content
16,013,921 members
Home / Discussions / C#
   

C#

 
QuestionSMS APPLICATION Pin
shawn41411-Jul-11 0:41
shawn41411-Jul-11 0:41 
AnswerRe: SMS APPLICATION Pin
nilesh ubhe11-Jul-11 1:23
nilesh ubhe11-Jul-11 1:23 
AnswerRe: SMS APPLICATION Pin
Shameel11-Jul-11 1:25
professionalShameel11-Jul-11 1:25 
AnswerCross post Pin
Not Active11-Jul-11 2:45
mentorNot Active11-Jul-11 2:45 
AnswerRe: SMS APPLICATION Pin
Carmelo La Monica11-Jul-11 4:44
professionalCarmelo La Monica11-Jul-11 4:44 
GeneralRe: SMS APPLICATION Pin
Herboren11-Jul-11 4:56
Herboren11-Jul-11 4:56 
AnswerRe: SMS APPLICATION Pin
Herboren11-Jul-11 5:25
Herboren11-Jul-11 5:25 
AnswerRe: SMS APPLICATION Pin
Herboren11-Jul-11 6:25
Herboren11-Jul-11 6:25 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net.Mail;

namespace EmailSMS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                MailMessage SMS = new MailMessage();
                SmtpClient SMTP_Server = new SmtpClient(SMTP_Server_Name);

                // Use Generic Account information
                SMTP_Server.Credentials = new System.Net.NetworkCredential(userName, password);
                
                // Who its from
                SMS.From = SMS_From;

                // Who its going out to
                SMS.To = SMS_To; // (areacode+prefix+suffix) or 5558675309@txt.att.net

                // Subject of SMS
                SMS.Subject = SMS_Subject;
                
                // Message/Body to SMS
                SMS.Body = SMS_Body;

                
                // SMTP Port
                SMTP_Server.Port = SMTP_Port;
                
                // SSL Enable
                SMTP_Server.EnableSsl = true OR false;


                // SMS Sent
                SMTP_Server.Send();


                // SMS Notification Sent Shown
                MessageBox.Show("SMS St Successfully!");


            }
            catch (Exception ex)
            {
                MessageBox.Show("Error while trying to send SMS.\n\nError: ", ex.ToString());
            };
        }
    }
}


In C#, Cutting out the SMS re sellers is like telling your employees to give up their carriers and switch to yours when you can't provide a reliable service. Use the generic email system, it helps and is less of a hassle. What I provided is a breakdown of what you can accomplish with the code. Its not much, so make use of it.
Questionlost connection on WebService Pin
goldsoft10-Jul-11 22:29
goldsoft10-Jul-11 22:29 
AnswerRe: lost connection on WebService Pin
Dave Kreskowiak11-Jul-11 1:05
mveDave Kreskowiak11-Jul-11 1:05 
AnswerRe: lost connection on WebService Pin
DaveAuld11-Jul-11 23:05
professionalDaveAuld11-Jul-11 23:05 
QuestionDelete a File - "File does not exist" Pin
phisco12310-Jul-11 6:44
phisco12310-Jul-11 6:44 
AnswerRe: Delete a File - "File does not exist" Pin
Dr.Walt Fair, PE10-Jul-11 8:49
professionalDr.Walt Fair, PE10-Jul-11 8:49 
AnswerRe: Delete a File - "File does not exist" Pin
Heath Stewart10-Jul-11 16:15
protectorHeath Stewart10-Jul-11 16:15 
GeneralRe: Delete a File - "File does not exist" Pin
Ennis Ray Lynch, Jr.11-Jul-11 5:31
Ennis Ray Lynch, Jr.11-Jul-11 5:31 
GeneralRe: Delete a File - "File does not exist" Pin
Herboren11-Jul-11 5:41
Herboren11-Jul-11 5:41 
GeneralRe: Delete a File - "File does not exist" Pin
phisco12311-Jul-11 7:11
phisco12311-Jul-11 7:11 
QuestionCode Sends Me To A New Page Before Completion Pin
PDTUM10-Jul-11 4:42
PDTUM10-Jul-11 4:42 
AnswerRe: Code Sends Me To A New Page Before Completion Pin
Richard MacCutchan10-Jul-11 5:27
mveRichard MacCutchan10-Jul-11 5:27 
GeneralRe: Code Sends Me To A New Page Before Completion Pin
PDTUM11-Jul-11 4:07
PDTUM11-Jul-11 4:07 
GeneralRe: Code Sends Me To A New Page Before Completion Pin
Richard MacCutchan11-Jul-11 4:55
mveRichard MacCutchan11-Jul-11 4:55 
AnswerRe: Code Sends Me To A New Page Before Completion Pin
BobJanova10-Jul-11 22:17
BobJanova10-Jul-11 22:17 
GeneralRe: Code Sends Me To A New Page Before Completion Pin
PDTUM11-Jul-11 4:11
PDTUM11-Jul-11 4:11 
QuestionControlMessage Pin
Snow White_10-Jul-11 2:13
Snow White_10-Jul-11 2:13 
AnswerRe: ControlMessage PinPopular
Dave Kreskowiak10-Jul-11 3:44
mveDave Kreskowiak10-Jul-11 3:44 

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.