Click here to Skip to main content

Visual Basic

 
GeneralRe: Getting All Logged On Users and IP VB.net PinmvpDave Kreskowiak12-Nov-12 11:02 
QuestionModule error> PLEASE HELP! Pinmemberleashim11-Nov-12 14:57 
AnswerRe: Module error> PLEASE HELP! PinmvpDave Kreskowiak11-Nov-12 18:08 
QuestionPizza order form PinmemberRitchie Vasquez11-Nov-12 6:59 
AnswerRe: Pizza order form PinmvpRichard MacCutchan11-Nov-12 7:21 
Questioncheck smtp connection before sending ? Pinmemberalejx9-Nov-12 10:02 
AnswerRe: check smtp connection before sending ? PinmvpDave Kreskowiak9-Nov-12 10:52 
GeneralRe: check smtp connection before sending ? Pinmemberalejx9-Nov-12 14:47 
thank you , but i need to check if smtp server is ready , and if not i need to display a warning to user and cancel the sending process. If is ready i can begin sending emails.
i have found this code , but doesn't work when i test with a invalid smtp server name:
 
public bool ValidSMTP(string hostName)
{
    bool valid = false;
    try
    {
        TcpClient smtpTest = new TcpClient();
        smtpTest.Connect(hostName, 25);
        if (smtpTest.Connected)
        {
            NetworkStream ns = smtpTest.GetStream();
            StreamReader sr = new StreamReader(ns);
            if (sr.ReadLine().Contains("220"))
            {
                valid = true;
            }
            smtpTest.Close();
        }
    }
    catch
    {
        throw;
    }
    return valid;
}

GeneralRe: check smtp connection before sending ? PinmvpDave Kreskowiak9-Nov-12 15:15 
QuestionAllow a Desktop app to check for JavaScript errors on given URL? Pinmemberpogowolf9-Nov-12 7:17 
QuestionUsing large XML dataset efficiently PinmemberDisIsHoody7-Nov-12 9:16 
AnswerRe: Using large XML dataset efficiently PinmemberDavid Mujica7-Nov-12 10:10 
Questionvb.net Web Browser Control! how to automate when web page is using frames. PinmemberKieran Sloan7-Nov-12 5:27 
AnswerRe: vb.net Web Browser Control! how to automate when web page is using frames. PinmemberZaf Khan26-Nov-12 3:13 
QuestionHelp with Error Message PinmemberGeorgieMPorgie5-Nov-12 4:32 
AnswerRe: Help with Error Message PinmentorWayne Gaylard5-Nov-12 5:05 
GeneralRe: Help with Error Message PinmemberGeorgieMPorgie5-Nov-12 6:03 
GeneralRe: Help with Error Message PinmentorWayne Gaylard5-Nov-12 19:31 
QuestionUse Reportvier to Show Table with Unknown Number of Columns PinmemberMember 76634803-Nov-12 16:03 
AnswerRe: Use Reportvier to Show Table with Unknown Number of Columns PinmvpDave Kreskowiak4-Nov-12 5:25 
AnswerRe: Use Reportvier to Show Table with Unknown Number of Columns PinmemberMycroft Holmes4-Nov-12 12:54 
QuestionHow can i retrieve image to pictureBox ? Pinmemberheinhtataung1-Nov-12 19:04 
AnswerRe: How can i retrieve image to pictureBox ? PinmemberEddy Vluggen2-Nov-12 1:57 
AnswerRe: How can i retrieve image to pictureBox ? PinmemberSZLMCL7-Nov-12 0:20 
QuestionHow can i save image in my N-tier application? Pinmemberheinhtataung31-Oct-12 21:20 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150302.1 | Last Updated 5 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid