Classic ASP with CDOSYS - syntax question:
I was using an old smtp sendmail script and ASP/VB to email formatted data from a webpage form
and was successfully creating the ‘message’ for the send using this syntax:
message = message & " " & VBCrLF & VBCrLF
message = message & "--------- Family Registration Information ---------" & VBCrLF & VBCrLf
message = message & "Parent 1: " & parent1 & "" & VBCrLf
message = message & mother & " " & mdob & "" & VBCrLf
message = message & "Mobile #: " & mmobile & "" & VBCrLf
message = message & mprof & " " & mco & " " & mwork & " " & VBCrLf
message = message & "Email Address: " & memail & "" & VBCrLf & VBCrLf
' etc...
When I changed over to creating a sendmail object using CDOSYS,
that same syntax for creating [ObjSendMail.TextBody = message] failed, throwing a VB/asp script error
If I change the [message = message] to this (below), it works:
message = message
& "--------- Family Registration Information ---------" & VBCrLF & VBCrLf
& "Parent 1: " & parent1 & "" & VBCrLf & mother & " " & mdob & "" & VBCrLf & "Mobile #: " & mmobile & "" & VBCrLf & mprof & " " & mco & " " & mwork & " " & VBCrLf & "Email Address: " & memail & "" & VBCrLf & VBCrLf
I hate this because it looks sloppy and is un-readbale. making it prone to errors when editing/changing.
Is there a way to keep my VB/asp [message = message] declaration looking neat and tidy so that will it will work with CDOSYS?