Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confirmation Emails

Status
Not open for further replies.

ozzroo

Technical User
Feb 28, 2003
182
AU
I am having troubles sending a confirmation email after client has registered.

My code is below:

Code:
Sub doEmailClient
 Dim objEmail as New MailMessage
 objMail.To = email.Text
 objMail.From = xxxxx
 objMail.Subject = xxxxx
 objMail.Body = xxxx
 objMail.BodyFormat = Mailformat.Html
 SmtpMail.SmtpServer = xxxxx
 Smtp.Send (objMail)

I run this code after inserting the record into the database and it sends an email perfectly to the client, but how to i then send another different email to the company to let them know the new registration.

I have tried adding another sub routine and putting it after the other sub like

doEmailClient
doEmailCompany

but company doesnt receive email, only client

Any ideas
 
Whats the code in the Company Email?

Are you sure that the company arent just blocking the email as spam?
 
The code is exactly the same. different subject and body and different email address

I have tried sending it to my own email address and my personal addrress and only receive 1 email
 
Code:
Sub doEmailClient
 Dim objEmail as New MailMessage
 objMail.To = email.Text
 objMail.From = noreply@primagic.co.uk
 objMail.Subject = Your callback detals
 objMail.Body = xxxx
 objMail.BodyFormat = Mailformat.Html
 SmtpMail.SmtpServer = xxxxx
 Smtp.Send (objMail)

Code:
Sub doEmailCompany
 Dim objEmail as New MailMessage
 objMail.To = email.Text
 objMail.From = noreply@primagic.co.uk
 objMail.Subject = New Callback submitted
 objMail.Body = xxxx
 objMail.BodyFormat = Mailformat.Html
 SmtpMail.SmtpServer = xxxxx
 Smtp.Send (objMail)
 
In the sample code the recipient is the same for both the client and the company so expect the recipient is receiving 2 emails:

Code:
objMail.To = email.Text

HTH

Smeat
 
If you don't send the first email that works, does the second one start working? Also try sending to one to one email address and the second to another address.

Have you looked at the Exchange logs to see what might be going on.

Looking at the code, if one works they both should work.


Senior Software Developer
 
Always check the easy stuff first before changing your code... Check your IIS settings.. if the SMTP in IIS is set up to have the same domain as the domain in the company email, it will automatically put the email in the DROP folder under C:\inetpub\mailroot\Drop

If this is the case, just change the domain in the SMTP to be something else. I generally use the DNS entry to the mail server (ie. mail.oxigen.ca) for my domain settings in SMTP, rather than the actual TLD (oxigen.ca).. because the email will be sent as xxxxx@oxigen.ca, it will assume that this email belongs on this server and send it directly to the Drop folder.

Cheers,

G.



Oxigen - Next generation business solutions
-----------------------------
Components/Tools/Forums/Software/Web Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top