- Messages
- 134
- Reaction score
- 0
- Points
- 26
Hi Symbianize,
Pahelp po ako ok naman kong gmail ang gagamitin kong e-mail pero kong yong sa office namin ayaw gumana any suggestion below my code.
View attachment 347833
attached error
Salamat Guys in Advance
Pahelp po ako ok naman kong gmail ang gagamitin kong e-mail pero kong yong sa office namin ayaw gumana any suggestion below my code.
Code:
Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
If Driver_Assigned.Text = "" Or Passenger_Name.Text = "" Or Flight_Date.Text = "" Or Pick_up.Text = "" Or Pick_Up_Time.Text = "" Or Drop_Point.Text = "" Or Requester_Name.Text = "" Or DM.Text = "" Then
MsgBox("Driver Name, Driver Contact No, Passenger Name, Date flight, Pick Up Location, Pick Up Time, Drop Location, Requester Name are Mandatory", MsgBoxStyle.Exclamation, "Transportation Dashboard")
Else
Try
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New Net.NetworkCredential("[email protected]", "123QWE")
Smtp_Server.Port = 443
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "mail.oursite.com.sa"
e_mail = New MailMessage()
e_mail.From = New MailAddress("[email protected]")
e_mail.To.Add("[email protected]")
e_mail.Subject = ("Transportation Request Confirmation")
e_mail.IsBodyHtml = False
e_mail.Body = "Transportation Book Details" & vbNewLine &
vbNewLine &
vbNewLine &
"Driver Name: " & Driver_Assigned.Text & vbNewLine &
vbNewLine &
"Driver Contact No.: " & DM.Text & vbNewLine &
vbNewLine &
"Passenger Name: " & Passenger_Name.Text & vbNewLine &
vbNewLine &
"Date flight: " & Flight_Date.Text & vbNewLine &
vbNewLine &
"Pick Up Location: " & Pick_up.Text & vbNewLine &
vbNewLine &
"Pick Up Time: " & Pick_Up_Time.Text & vbNewLine &
vbNewLine &
"Drop Location: " & Drop_Point.Text & vbNewLine &
vbNewLine &
"Requester Name: " & Requester_Name.Text &
vbNewLine &
vbNewLine &
"REMARKS: " & Requester_Name.Text
Smtp_Server.Send(e_mail)
MsgBox("Email Successfully Sent", MsgBoxStyle.Information, "Transportation Dashboard")
Catch error_t As Exception
MsgBox(error_t.ToString)
End Try
End If
End Sub
attached error
Salamat Guys in Advance