Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

For expert in VB only

God love us

Amateur
Advanced Member
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.

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
View attachment 347833
attached error

Salamat Guys in Advance
 

Attachments

  • error.PNG
    error.PNG
    13.6 KB · Views: 16
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.

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
View attachment 1264307
attached error

Salamat Guys in Advance


try mo change yung
Code:
Smtp_Server.Port = 443

To
Code:
[B]Smtp_Server.Port = 465[/B]
 
Back
Top Bottom