|
-
Dec 16th, 2003, 12:15 PM
#1
Thread Starter
Frenzied Member
Email from ASP.NET Web Page
Is there a way to send an automatic email from an ASP.NET
page? This page would be hosted on my personal space from my
ISP so I figured it wasn't possible because there wouldn't be an
email client or whatever.
I know the user viewing the page could send an email by
clicking a hyperlink but this would need to be automatically sent
from the page at a certain time.
Just wondering if this is possible.
Last edited by wey97; Dec 16th, 2003 at 12:19 PM.
-
Dec 16th, 2003, 02:23 PM
#2
Frenzied Member
If the server has some type of email component like CDONTS or Persits.MailSender...then it could be done, otherwise I think the only way to do it would be to have a mailto: link.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Dec 16th, 2003, 09:37 PM
#3
PowerPoster
Does this work:
Code:
Dim m As New MailMessage()
m.To = "[email protected]"
m.From = "[email protected]"
m.Subject = "Sending you an email"
m.BodyFormat = MailFormat.Html
m.Body = "HERE IS MY MESSAGE"
SmtpMail.SmtpServer = "mail.somesite.com"
SmtpMail.Send(m)
The smtp server is the one you send mail from.
-
Dec 17th, 2003, 01:37 PM
#4
Hyperactive Member
Any Idea how would you set the reply-to (or receipt-to) using that object? I don't want to fake the .from
GaZ
-
Dec 17th, 2003, 06:58 PM
#5
PowerPoster
I don't understand. Why would you 'fake' it? You have to put in a to and from email address. It is pretty straight forward. Who do you want it to go to, and who is it from....
I think those objects are in the System.Web.Mail namespace, forgot to mention that.
-
Dec 18th, 2003, 03:04 AM
#6
Hyperactive Member
yea but I want to put other peoples addresses in the .from as the site would be sending emails on behalf of people.
I think the problem with this is the dns doesn't resolve or match to the server it was sent from and causes some problems (I think)
Also if you set the "reply-to" rather than from then should the email bounce back for whatever reason it would go to the .from not the reply-to address..... and if im sending emails on behalf of people I would like to handle the bouncy emails rather than them :-)
I'll keep searching google, I cant be the only person who wants to do this 
GaZ
-
Dec 18th, 2003, 11:04 AM
#7
PowerPoster
I do this on my forums. I send a email to another user via a form, and use that code I posted as the way to send. Now, your server may not handle it the way mine does, so in that case I wouldn't know how to handle it. Maybe you can get with the mail server people and have them help you out.
-
Dec 18th, 2003, 11:13 AM
#8
Hyperactive Member
.....so you set the .from to be an Email address that isn't associated with your site? I currently do this on my site but I dont think its actually legal anymore (hiding identity rule) but the main reason I dont want to do this is for the bouncy email handling
I've got an idea which I'll test out later :-)
thanks and erm hope original problem actually got sorted (I should have started a new thread tbh)
GaZ
-
Dec 18th, 2003, 03:53 PM
#9
PowerPoster
Originally posted by tailz
.....so you set the .from to be an Email address that isn't associated with your site?
Yes, because the person is sending it through my site. I can't have it coming from my site, otherwise the person they are emailing will respond to my sites address, not the original sender. The reason for me being the middle man is that I don't have to expose peoples email addresses to spiders and such. This means that if a person sends an email, it is all done through email instead of having mailto links on my pages for spiders to crawl over and collect for spamming reasons.
As far as legal, it is fine. You see, I add at the bottom of the message being sent where it was from and how this person got their email. Users can select not to be emailed, and then they won't. I have also authenticated the user sending the email before they can send so that isn't a problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|