VBScript - using IF statements in a mail script?
Posted
by Kenny Bones
on Stack Overflow
See other posts from Stack Overflow
or by Kenny Bones
Published on 2009-09-07T07:58:13Z
Indexed on
2010/03/25
17:03 UTC
Read the original article
Hit count: 198
I really need some quick tips here.
I've got this VBScript script which sends an e-mail. And I want to do several checks to see if an attribute is true and if it is, write an additional line in the mail.
How can I do this? This is part of the script:
obMessage.HTMLBody = ""_
& "<MENU>"_
& "<LI type = square>This is a line</i>."_
I want something which looks like this:
obMessage.HTMLBody = ""_
& "<MENU>"_
If statement1 = true Then
& "<LI type = square>This is an additional line</i>."_
end if
Preferrably, could some select statements be made? I don't really mind what the code looks like, I just want it to work as soon as possible :)
© Stack Overflow or respective owner