Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 email autosend
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

quince
Junior Member

Canada
103 Posts

Posted - 18 January 2005 :  07:05:25  Show Profile
hello everyone .. i have a form and when a user fill in the form he will write his email also in it ... what i need is when this user submit his form to send him an email but thank you for registering in my website , blab, blab, blaaa . could anyone help me with my problem ...

thanks in advance
quince

Edited by - quince on 18 January 2005 07:06:08

Doug G
Support Moderator

USA
6493 Posts

Posted - 18 January 2005 :  23:27:03  Show Profile
You could look at how this forum code does the same thing.

There are many tutorials on asp email, try places like www.w3schools.com

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 19 January 2005 :  02:54:39  Show Profile
hi doug G i tried to use the code as a test but i get an error

the code that i used:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="quince_103@hotmail.com"
myMail.To="qb_103@hotmail.com"
myMail.TextBody="This is a message."
myMail.Send
response.redirect("index1.asp")
%>
the error that i get is :

Error Type:
CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid. 
/middle/email.asp, line 7



line 7 is the mymail.send
so what shell i do .. ?

Edited by - quince on 19 January 2005 03:44:50
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 19 January 2005 :  03:27:10  Show Profile
hi doug G while i was searching in the internet i found that i need to set my smtp so i will be able to send emails from my computer ... i had reached to the point where i need to change the smtp but i don't know what shell i put in it will you help me please ... ?
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 20 January 2005 :  15:11:56  Show Profile
i had found another code, it is working without error but it doesn't send the message it keep it in the \mailroot\Queue ... what shell i do with this problem ...???

in case you want to see the code here is the code and i am sure it is not with the code :

<%

If request("submit") <> "" THEN
Set objEMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Confi = objConfig.Fields
Confi("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Confi("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\inetpub\mailroot\pickup"
Confi.Update
Set objEMail.Configuration = objConfig
objEMail.To = "qb_103@hotmail.com"
objEMail.From = Request("from")
objEMail.Subject = Request("subject")
objEMail.TextBody = Request("message")   
objEMail.Send
Set objEMail = Nothing

Response.Write("Message Sent")
Else

%>

<form method="post" action="email.asp">
From Email: <INPUT type=text name="from" size="20"><br />
Subject: <INPUT type=text name="subject" size="20"><br />
Message: <TEXTAREA name="message" rows=10 cols=40></TEXTAREA><br />
<INPUT type="submit" value="Send" name="submit">
</form>

<%
End If
%>


thanks in advance,
quince
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 21 January 2005 :  02:04:42  Show Profile
I'm thinking your smtp server isn't set up properly. You might look over the code in snitz that does emails, perhaps the code will give you some help.


======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 21 January 2005 :  15:43:22  Show Profile
Oh, I see I repeat myself

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 21 January 2005 :  18:38:35  Show Profile
well i tried everything .... and it didn't work ... i think i am not gonna do it .. i will leave it till it fix itself
thanks man for helping me
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 23 January 2005 :  00:25:40  Show Profile
Sorry it didn't work out. I don't use CDO myself and I'm not all that familiar with how to code CDO and what can go wrong.

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 29 January 2005 :  17:37:34  Show Profile
hi Doug G ... i had fix the problem ..it was something with the SMTP ... but Doug G one small question :) when the message is submitted i get it to the junk mail in the hotmail .. so how can i do it to come immediatly to the inbox .. is there any way ???
thanks man ..;)
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 29 January 2005 :  18:20:53  Show Profile
One likely reason is your SMTP server fails a reverse DNS test.

There are many different junkmail filters, do some googling on all the different anti-spam features of email server.

Most mail server will let you whitelist a particular site or domain, perhaps you can identify your SMTP server to hotmail.

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 29 January 2005 :  20:55:18  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
quote:
so how can i do it to come immediatly to the inbox .. is there any way

If there was a way, all spammers would be using it. Most free mail providers use their own rules to identify spam, some even mark all cdonts mail as spam.

Changing the sender from quince_103@hotmail.com to another email address.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 30 January 2005 :  01:00:09  Show Profile
thanks Podge for your reply ... but what will i get if i change the sender ... and i am not using the first code that i had display it first i am using the second one which is with the form ....
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 30 January 2005 :  06:56:09  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Your mail server may require that email be sent from one of the domains setup on the mail server.
If it is setup that way you would have to use authentication in order to send yourself the email.

The code in inc_mail is already setup for this -

Set iConf = Server.CreateObject ("CDO.Configuration")
        	Set Flds = iConf.Fields 

	        'Set and update fields properties
        	Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
	        Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.domain.com"
		Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
		Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "me@domain.com"
		Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
        	Flds.Update

	        Set objNewMail = Server.CreateObject("CDO.Message")
        	Set objNewMail.Configuration = iConf

		objNewMail.To = "qb_103@hotmail.com"
		objNewMail.From = Request("from")
		objNewMail.Subject = Request("subject")
		objNewMail.TextBody = Request("message")   
		objNewMail.Send


Actually now that I think about it, if your mail server wasn't setup like I have suggested above anyone could send mail through it. Not good.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.

Edited by - Podge on 30 January 2005 06:58:39
Go to Top of Page

quince
Junior Member

Canada
103 Posts

Posted - 30 January 2005 :  17:01:52  Show Profile
i will check it and i will reply on you as soon as i try it ...
thanks Podge and also thank you Doug G
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07