Click here to Skip to main content
15,905,782 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Project Guideline Pin
Dave Kreskowiak7-Oct-07 3:01
mveDave Kreskowiak7-Oct-07 3:01 
GeneralRe: Project Guideline Pin
Sarfaraj Ahmed8-Oct-07 1:55
Sarfaraj Ahmed8-Oct-07 1:55 
GeneralRe: Project Guideline Pin
Dave Kreskowiak8-Oct-07 4:34
mveDave Kreskowiak8-Oct-07 4:34 
GeneralRe: Project Guideline Pin
Sarfaraj Ahmed8-Oct-07 23:08
Sarfaraj Ahmed8-Oct-07 23:08 
GeneralRe: Project Guideline Pin
Dave Kreskowiak9-Oct-07 1:46
mveDave Kreskowiak9-Oct-07 1:46 
QuestionCreating custom property like TextAlign,BorderStyle for runtimeControls Pin
VB 8.05-Oct-07 2:30
VB 8.05-Oct-07 2:30 
AnswerRe: Creating custom property like TextAlign,BorderStyle for runtimeControls Pin
visualhint5-Oct-07 4:16
visualhint5-Oct-07 4:16 
QuestionSend mail using gmail Pin
Soumyadipta5-Oct-07 2:03
Soumyadipta5-Oct-07 2:03 
I am using the following code to send mail but it fails with message below

System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server.


/////////////////////////////// Code //////////////////////////////////////////////////////////

Imports System.Web.Mail
Public Class Form1
Inherits System.Windows.Forms.Form


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim oMsg As MailMessage = New MailMessage

oMsg.From = "from@gmail.com"
oMsg.To = "to@alumnux.com"
oMsg.Subject = "Test Mail from soumya"
oMsg.BodyFormat = MailFormat.Html

oMsg.Body = "Hellow WorldSniff | :^) "

SmtpMail.SmtpServer = "smtp.gmail.com"
oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtp.gmail.com")
oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "587")
oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", 2)
oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true") 'set your password here
oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication
oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "user@gmail.com") 'set your username here
oMsg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password") 'set your password here

SmtpMail.Send(oMsg)

oMsg = Nothing

End Sub
End Class
AnswerRe: Send mail using gmail Pin
ESTAN6-Oct-07 5:19
ESTAN6-Oct-07 5:19 
GeneralRe: Send mail using gmail Pin
Soumyadipta10-Oct-07 19:23
Soumyadipta10-Oct-07 19:23 
Questionhow can i get back comumn data from Data Set Pin
Naveed7275-Oct-07 0:39
Naveed7275-Oct-07 0:39 
AnswerRe: how can i get back comumn data from Data Set Pin
pmarfleet5-Oct-07 1:15
pmarfleet5-Oct-07 1:15 
QuestionI want to create an Attendance Register for My Company using VB.net Pin
skullz_softwares5-Oct-07 0:10
skullz_softwares5-Oct-07 0:10 
AnswerRe: I want to create an Attendance Register for My Company using VB.net Pin
Christian Graus5-Oct-07 1:11
protectorChristian Graus5-Oct-07 1:11 
AnswerRe: I want to create an Attendance Register for My Company using VB.net Pin
GuyThiebaut5-Oct-07 4:41
professionalGuyThiebaut5-Oct-07 4:41 
QuestionFilling a typed dataset Pin
steve_rm4-Oct-07 22:16
steve_rm4-Oct-07 22:16 
AnswerRe: Filling a typed dataset Pin
Johan Hakkesteegt5-Oct-07 0:06
Johan Hakkesteegt5-Oct-07 0:06 
QuestionVB DLL Question Pin
yoya03034-Oct-07 22:08
yoya03034-Oct-07 22:08 
AnswerRe: VB DLL Question Pin
Dave Kreskowiak5-Oct-07 1:52
mveDave Kreskowiak5-Oct-07 1:52 
GeneralRe: VB DLL Question Pin
yoya03035-Oct-07 2:15
yoya03035-Oct-07 2:15 
GeneralRe: VB DLL Question Pin
Dave Kreskowiak5-Oct-07 3:50
mveDave Kreskowiak5-Oct-07 3:50 
GeneralRe: VB DLL Question Pin
yoya03035-Oct-07 4:06
yoya03035-Oct-07 4:06 
QuestionData reader (need your help guys) Pin
dienadel4-Oct-07 15:43
dienadel4-Oct-07 15:43 
AnswerRe: Data reader (need your help guys) Pin
Christian Graus4-Oct-07 19:10
protectorChristian Graus4-Oct-07 19:10 
AnswerRe: Data reader (need your help guys) Pin
Dave Kreskowiak5-Oct-07 1:49
mveDave Kreskowiak5-Oct-07 1:49 

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.