Sub SendMailProcessing()
Dim myMessage As New MailMessage
Dim str As New StringBuilder
Dim StylePath As String = Session("MyStylePath") 'path to an uploaded pic
Dim PicturePath As String = Session("MyPicturePath")'path to an uploaded pic
MyList = Session("List")
'build the body of the email
str.Append("First Name: " & MyList("First_Name") & ControlChars.CrLf)
str.Append("Last Name: " & MyList("Last_Name") & ControlChars.CrLf)
str.Append("Address: " & MyList("Address") & ControlChars.CrLf)
str.Append("Apartment Number: " & MyList("Apt") & ControlChars.CrLf)
str.Append("City: " & MyList("City") & ControlChars.CrLf)
str.Append("State: " & MyList("State") & ControlChars.CrLf)
str.Append("Zip: " & MyList("Zip") & ControlChars.CrLf)
str.Append("Phone: " & MyList("Phone") & ControlChars.CrLf)
str.Append("Email: " & MyList("Email") & ControlChars.CrLf & ControlChars.CrLf)
str.Append("BaseColor: " & MyList("Base_Color") & ControlChars.CrLf)
str.Append("Hair Type: " & MyList("Hair_Type") & ControlChars.CrLf)
str.Append("Wave Type: " & MyList("Wave_Type") & ControlChars.CrLf)
str.Append("Front to back measurement: " & MyList("Front_to_Back_Measurement") & ControlChars.CrLf)
str.Append("Side to side measurement: " & MyList("Side_to_Side_Measurement") & ControlChars.CrLf)
str.Append("Top Length: " & MyList("Top_Length") & ControlChars.CrLf)
str.Append("Front_Length: " & MyList("Front_Length") & ControlChars.CrLf)
str.Append("Side Length: " & MyList("Side_Length") & ControlChars.CrLf)
str.Append("Back Length: " & MyList("Back_Length") & ControlChars.CrLf & ControlChars.CrLf)
str.Append("Special Instructions: " & MyList("Special_Instructions") & ControlChars.CrLf)
With myMessage
.From = MyList("Email")
.Subject = "Incoming Order"
.Body = str.ToString
.BodyFormat = MailFormat.Text
If StylePath <> "" Then
.Attachments.Add(StylePath)
End If
If PicturePath <> "" Then
.Attachments.Add(PicturePath)
End If
End With
SmtpMail.Send(myMessage)
End Sub