Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sending E-Mail Automatically from a web page

Posted on 2001-08-07
23
Medium Priority
?
168 Views
Last Modified: 2010-04-09
Is there a way to automatically fire off a email?  Im tryin to use the mailto: command but the brings up the message compose window which i dont want but if i have to keep that why does it cut off some of the body of my message. Is there a limit on length of the URL?
0
Comment
Question by:superdesio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 4
  • +4
23 Comments
 

Author Comment

by:superdesio
ID: 6361734
an example if i wanted to send a thank you to someone who just registered at my site?

0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6361760
If someone has just registered at your site then you must have a server-side script to do that, yes?

If so, then it is much better to fire an email from the server, perhaps using the same script.

Avoid mailto whenever possible, it is fraught with problems and often won't work.

Ant
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6361811
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:dij8
ID: 6361868
As has been said, if you want to send email without any prompting then it MUST be done srver side.  This is exactly what I have done on my site.

How you do this is determined by what your server supports.  If it supports CGI then I am sure someone here can give you CGI code that will do that for you.  Or there may already be a CGI script on the server that does it.  If it supports ASP then I could probably give you code for that.  Better still, if the server is IIS then there may be ASPMail installed.  Which is really easy and I can definitely give you code for that.  Then there is JSP, PHP, ColdFusion, and other languages as well.

Before any of this can be given to you we need to know what options you have.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6362589
The use of mailto will not solve your problem. It requires user intervention. You need a server side scripting like ASP.

Firstly, you got to tell us are do you know of any server side language? If yes, what are they and which one do you intend to use.

hongjun
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6362746
Didn't I more or less say that already????

Ant
0
 

Expert Comment

by:webmanager
ID: 6364155
You can use a cgi mailer form too.....
0
 
LVL 10

Expert Comment

by:dij8
ID: 6364320
Didn't I more or less say that already????

dij8
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6364344
LOL

It's amazing isn't it dij8......

:oP

Ant

P.S. Glad my earlier comment came in useful! ;o)
0
 

Author Comment

by:superdesio
ID: 6364655
the server is IIS so how would i use ASPmail?
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6364836
Take a look at:

http://www.cgiware.com/aspmailer.html

:o)

Ant
0
 

Author Comment

by:superdesio
ID: 6365063
if i am not mailing stuff from a form can i still use ASPmailer?  I just want to send a pre-written email.

0
 

Author Comment

by:superdesio
ID: 6365252
i need to use the mailto command.  Is there a limit on the length of the URL?

0
 

Author Comment

by:superdesio
ID: 6365386
my messages keep getting cut at 260 character urls.
0
 
LVL 10

Expert Comment

by:dij8
ID: 6365446
I would guess then that there is a 260 character limit on URL's.  I know there used to be a security issue with long URL's.  Maybe this is a part of the fix.

ASPMail is probably the most common email component used in ASP.  Even more common than CDONTS which is built into IIS.  It is a third party component though and needs to be installed.  If it is then I can give you the code you need.

Details on ASPMail can be found at http://www.serverobjects.com/products.htm#aspmail

Details on CDONTS (built into IIS and I can give you code for that as well) can be found at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdo/html/_denali_newmail_object_cdonts_library_.asp
0
 
LVL 10

Expert Comment

by:dij8
ID: 6365459
Oh yeah, and you can send what you want in the email (either with ASPMail or CDONTS).  It does not need to be processed by a form.  It does need an email address so if you want to send anything to the user then you will need to get their email address somehow.
0
 
LVL 10

Expert Comment

by:dij8
ID: 6365471
Oh yeah, and you can send what you want in the email (either with ASPMail or CDONTS).  It does not need to be processed by a form.  It does need an email address so if you want to send anything to the user then you will need to get their email address somehow.
0
 

Author Comment

by:superdesio
ID: 6365532
i dont want to use my server to send the email.  I need whatever the persons computer is configured to send the email.  Is there some kind of URL limit on the server?
0
 
LVL 10

Expert Comment

by:dij8
ID: 6365634
If your URL is getting cut at 260 characters then yes there is.

Netscape say there isn't with their browser, http://help.netscape.com/kb/consumer/19971015-8.html

Someone else has this to say, http://www.intranetjournal.com/ix/msg/17613.html
and this, http://www.intranetjournal.com/ix/msg/12950.html

I found this from Microsoft, http://support.microsoft.com/support/kb/articles/Q260/6/94.ASP

I do not believe there is a limit in the HTTP 1.0 spec (RFC
1945) or the URL spec (RFC 1738).  
0
 
LVL 33

Expert Comment

by:hongjun
ID: 6366776
>>if i am not mailing stuff from a form can i still use ASPmailer

Yes you can.

Below is a code that uses CDONTS.NewMail to send an email. It is a built-in component when you are using IIS. You got to setup SMTP services and make sure that it is running.

<%
Dim objMailer
Dim strBody

' You can have HTML tags here
' You can therefore customize the format you want to send
strBody = "<TABLE BORDER='0'><TR><TD>Hello</TD><TD>World</TD></TR></TABLE>"

Set objMailer = CreateObject("CDONTS.Newmail")
objMailer.From = "sender@domain.com"
objMailer.To = "receipent@domain.com"
objMailer.Subject = "Your subject here"
objMailer.BodyFormat = 0
objMailer.Mailformat = 0
objMailer.Body = strBody
objMailer.Send
Set objMailer = Nothing
%>

See this for more information on CDONTS.
http://msdn.microsoft.com/library/psdk/cdo/_denali_newmail_object_cdonts_library_.htm

Notice from the coding that you can indicate the body of the mail to be sent without using a form.

hongjun
0
 
LVL 3

Expert Comment

by:CyberSoft
ID: 6372118
You wrote:

i dont want to use my server to send the email.  I need whatever the persons computer is configured
to send the email.  Is there some kind of URL limit on the server?

Hi superdesio,

No, as far as I am aware there is no way you can automatically get he user's machine to automatically (ie without them knowing it and without their intervention) send off an email using their mail client - that would just be a security risk at best.

Regards,
CyberSoft
0
 

Author Comment

by:superdesio
ID: 6386163
thats what i ment.  I need it to open a message composition window. But it keeps cutting my message short to 260 chars.

0
 
LVL 3

Accepted Solution

by:
CyberSoft earned 300 total points
ID: 6387303
That's because there is a 260 (or a bit less I think 255) character limitation to the querystring.

Regards,
CyberSoft
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question