• 0

[VBScript/ASP] Email function issue


Question

Hi everyone :) I have a quick question. I have this email script which works great, but I tried changing the static email at the AddBCC function to a variable and it doesn't send it. I know I got to be doing something wrong b/c I'm kind of not 100% familer with vbscript. I'm more of a C#/.NET guy. Here's the line:

function WA_Universal_Email_1_SendMail(RecipientEmail)
  dim MailObject, MailAttachments, MailBCC, MailCC, MailTo, MailBodyFormat, MailBody, MailImportance, MailFrom, MailSubject
  MailAttachments = ""
  MailBCC		 = ""
  MailCC		  = ""
  MailTo		  = ""
  MailBodyFormat  = ""
  MailBody		= ""
  MailImportance  = ""
  MailFrom		= "" & cStr((rsUser_Quote.Fields.Item("users_email").Value)) & ""
  MailSubject	 = "New Bastech speedQUOTE Request (Quote No. " & cStr(Session("svQuotes_ID")) & ")"

  'Global Variables
  userEmail = "" & cStr((rsUser_Quote.Fields.Item("users_email").Value)) & ""
  gAddBCC = ""
  gAddCC = ""
  gAddRecipient = ""
  gBodyFormat = ""
  gSetImportance = ""

  set WA_MailObject = WAUE_Definition()

  if (RecipientEmail <> "")	 then
	set WA_MailObject = WAUE_AddRecipient(WA_MailObject,RecipientEmail)
	MailTo = gAddRecipient
	gAddRecipient = ""
  else
	'To Entries
  end if

  'Attachment Entries

  'BCC Entries
  set WA_MailObject = WAUE_AddBCC(WA_MailObject,userEmail)
  MailBCC = gAddBCC

Am I doing it wrong? Maybe someone could point me in the right direction? Thanks :)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Here's the line:

Here's the line, lol... ;)

so, what exactly have you changed so far?

scanning that code.. it looks as if you have omitted some parts.. like the AddBCC function :o

unless i'm missing something?

Link to comment
Share on other sites

  • 0

lol sorry I should've been more clear. The userEmail is the line that apparently is not right. The addBCC cmd is in that code:

'BCC Entries
  set WA_MailObject = WAUE_AddBCC(WA_MailObject,userEmail)
  MailBCC = gAddBCC

Is that programmically correct? B/c I have to be messing up somewhere. If I change that cmd to WAUE_AddBCC(WA_MailObject,"myemail@email.com") it fires off the email fine.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.