|
I use asp mail to send mails from the site. It works fine for all time, till I used it in some other place. It works fine whenI used for sending the feedback etc.
I tried the same to implement for the friend referal etc. I tried to make the interface different and combine as general function later.
So I copy & paste the codes. Now, it doesnt work for the new mail sending. The mail sending works fine only for my domain's mail ID, like name1@mydomain.com, name2@mydomain2.com. It fails when I give any mail id as name@hotmail.com etc. It doesnt print any error message at the "mailobject.Response".
I even tried to run the page individually by hardcoding the mail address, but it doesnt work!!
Whats the problem??
I was born intelligent Education ruined me!.
|
|
|
|
|
Post some code.
Jon Sagara
Hi! I'm Melanoma, Moley Russell's wart.
-- Uncle Buck
|
|
|
|
|
OOps... I forgot that... Will put it down...
sndMail = Server.CreateObject ( "SMTPsvg.Mailer" ); <br />
<br />
if ( strFromEmail == "" )<br />
sndMail.ReplyTo = 'info@mydomain.com';<br />
else<br />
sndMail.ReplyTo = strFromEmail;<br />
<br />
sndMail.FromAddress = 'web@mydomain.com';<br />
sndMail.RemoteHost = 'mail.mydomain.com';<br />
<br />
sndMail.AddRecipient ( "", strToEMail);<br />
Response.Write ("<br>To : ")<br />
Response.Write (strToEMail)<br />
Response.Write ("<br>")<br />
<br />
sndMail.Subject = sSubject;<br />
sndMail.BodyText = sBody;<br />
<br />
sndMail.SendMail ( );<br />
<br />
Response.Write ("<br>Response :")<br />
Response.Write (sndMail.Response)<br />
Response.Write ("<br>")
I was born intelligent Education ruined me!.
|
|
|
|
|
Hi, I have this simple script:
<%
'Send the password:
msg_recipient = "someone@someaplace.com"
msg_sender = "sender@anotherplace.com"
msg_subject = "Testing AA"
msg_body = "Testing AA"
Dim NewMailObj
Set NewMailObj = CreateObject("CDONTS.NewMail")
NewMailObj.To = msg_recipient
NewMailObj.From = msg_sender
NewMailObj.Subject = msg_subject
NewMailObj.Body = msg_body
NewMailObj.Send
Set NewMailObj = Nothing
%>
<% Response.write "Done" %>
"NO" error. But no mail has been sent out (I've checked the mailbox)... I am sure that I have SMTP on the Windows2000 box - I can find it in >"Computer Management" applet>"Services and Applications">"Services". I can find the mailroot folders and sub-folders. BUT I "canNOT" find it under IIS - as instructed: http://www.skybuilders.com/users/jesse/docs/howToSMTP.html
As far as I know ASPEmail need SMTP service also isnt that right?
The above script executed with no error - so that leaves me with one possibility - SMTP wasn't properly configured?? Thanks.
norm
|
|
|
|
|
Thanks for the reply. But I am not using CDONTS. I know my site doesnt support that stuff. I do use ASPMail.
Thanks for ur reply!!!
I was born intelligent Education ruined me!.
|
|
|
|
|
yes, but both ASPMail and CDONTS talks to SMTP... so, if the problem comes from SMTP, you and I may be on the same boat.
norm
|
|
|
|
|
NO my friend.
If you can see my FIRST message of this thread, you can see that my code is working fine with ASPMail. And I was trying to do the same at different interface, and it fails to send the mail. Thats the code I posted.
Finally I changed my code as a generic one by directing to the already 'working' mail part. But still, I have no idea of why and how the code wasnt working there.
I was born intelligent Education ruined me!.
|
|
|
|
|
o, sorry about that. i hijacked your session.
norm
|
|
|
|
|
Finally.... did u got a method to run ur mail from the site??
I was born intelligent Education ruined me!.
|
|
|
|
|
no, i spent the weekend at some cybercafe slaughtering my friends playing warcraft 3
anyway, I had a new problem which I need to resolve first. damn, it's near the end and i am stuck watching the screen wondering if it would take me another year to fix these small bugs.
norm
|
|
|
|
|
norm wrote:
I had a new problem which I need to resolve first
I guess... U HAD already solved it. Else post it here in CP. People are here to help u out!
I was born intelligent Education ruined me!.
|
|
|
|
|
it's too weird to post it here. i have a page that used to work. than, i broke another page. and this page stopped working properly and i cant really post it here until i narrow it down more.
norm
|
|
|
|
|
I was born intelligent Education ruined me!.
|
|
|
|
|
Hello,
I am wondering if anybody may know how to see if a textarea has been scrolled all the way down. I cannot seem to find anything on it. If there was some way to get the text that the user is currently viewing into a string then I could check to see if it is at the end.
Any ideas?
Jonathan
|
|
|
|
|
I have written a vb class module which simply writes a string to a file and compiled this as a dll.Now when I registered this dll using regsvr32.exe from the system32 folder under WINNT directory in the win2k server,I can access this dll from my ASP code simply by using Server.CreateObject("dll name").
1>Is this dll a com?
2>Whats the difference between a com and a dll?
3>So if it is possible to access this dll through ASP by registering the component in the server registry,then what is the utility of using MTS in IIS?
Since I am a beginner in web development,I would also like to know about the other functionalities and advantages of using MTS with IIS.Address of any relevant web site dealing in similar topics will also help me a lot....
Thanking u all in advance...
Anirban
|
|
|
|
|
It's very weird.
<%
Response.Write( "bExistingLogin: " & bExistingLogin & " " )
Response.Write( "bSuspended: " & bSuspended & " " )
Response.Write( "bEMailPrevReg: " & bEMailPrevReg & " " )
If bExistingLogin="1" Or bSuspended="1" Or bEMailPrevReg="1" Then
Request.Form("bLoginStatus")="1" PROBLEM HERE!
Server.Transfer("login_gui.asp")
End If
%>
That's all I'm doing, but apparently the script engine is not happy that I reference 'Form' property of the Request Object:
Request.Form("bLoginStatus")="1"
The error message:
"Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Form'
/submit_changed_profile.asp, line 23"
Thanks a bunch!
norm
|
|
|
|
|
You're getting that error because you are trying to write to a member of the Request.Form collection which is read-only.
If I were you I would first assign Request.Form("bLoginStatus") to a variable i.e.
bLoginStatus = Request.Form("bLoginStatus")
then you can update the variable and use that.
It will save you some typing as well
|
|
|
|
|
yea, i figured that out after a few hours of debugging, that's the problem when u're noew to a language =)
norm
|
|
|
|
|
Thanks, my mistake =)
norm
|
|
|
|
|
Hi, I am having problem with the following ADO error:
"ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/check_past_record.inc, line 90"
I wish to know if I oRS.Close() will close the associated oConn (connection object)?
Here's the code snippet:
Set oConn = Server.CreateObject("ADODB.Connection")
'Connecting to Microsoft SQL Server:
oConn.ConnectionString = "Provider=sqloledb; Data Source=(local); Initial Catalog='DummyDB'; User ID=sa; Password=sa"
oConn.Open
Set oRS = Server.CreateObject("ADODB.Recordset")
oRS.Open "SELECT * FROM passwords WHERE login <>'" & Trim(Request.Form("txtOldLogin")) & "'", oConn, 2, 3
oRS.Find "login = '" & fldLogin & "'"
If oRS.EOF Then
bExistingLogin="0"
Else
bExistingLogin="1"
End If
oRS.Close() QUESTION: Is THIS NECESSARY?? What am I doing here exactly? Just closing the recordset? Or recordset PLUS oConn in ONE statement?
oRS.Open "SELECT * FROM passwords", oConn, 2, 3
oRS.Find "login = '" & Request.Form("txtOldLogin") & "'"
Alrite, I think this should be enuf to illustrate my...
Thanks!
norm
|
|
|
|
|
norm wrote:
QUESTION: Is THIS NECESSARY?? What am I doing here exactly? Just closing the recordset? Or recordset PLUS oConn in ONE statement?
You are closing the recordset not the connection. As to whether it is necessary or not, I always do for the sake of keeping everything tidy, but if you are executing a new query ADO will close the recordset for you. I haven't tried, but I suspect closing the connection when you have a recordset open may close the recordset then too, and assigning "Nothing" to it may as well. I would always specifically close the recordset though and not rely on any of that. If nothing else then at least you know when things are open and closed which helps if you are tracking down a problem like this.
As to the "Operation is not allowed when the object is closed" error, do you get an error code, something like -000000000? I haven't checked yet, but there may be different codes for different failed operations. Is the select query returning any records? (I think it should throw a different error if it was, but it's worth checking) Where is the error being thrown? When you open the recordset again or when you call the Find member? If the former, try using oRS = oConn.Execute "sql..." to open your recordset and see if it makes any difference. If not, try creating a new ADODB.RecordSet object. If it still fails, try closing and re-opening the connection too. If an error isn't immeadiately obvious you can usually get a good idea what is triggering it if through trial and error like this.
Also, check you have the latest version of MDAC installed.
|
|
|
|
|
|
Just for curiosity's sake, if it's not trouble, what was the problem in the end?
|
|
|
|
|
here it is:
If some condition Then
oRS.Open .....
Do something with oRS
End If
oRS.Close Depending on whether the above if-block was executed or not, this close statement may generate the error. My mistake!
oRS.Open NewSQLStatement
...
...
...
Thanks!
norm
|
|
|
|
|
I would be grateful if folk could spare a few moments to visit my newest website.
It is designed to be local to one area of Scotland but as the logs show we are getting hits from around the world I would love some feedback!
http://www.angusblog.co.uk[^]
Thanks,
Davy
Weblog, Ramblings and more...
www.latedecember.com
|
|
|
|