Αρχή :: Ενότητες :: Scripting :: Απαντήσεις     
 

Forum

ASPEmail Απο ASPmail - Από {bobos}

Ο Mail server ΠΑιζει με ASPEmail Και οχι με aspmail .και με
CDOMail
CDOSYS
JMail
ΣΕ αλες εφαρμογες λειτουργει τελεια αλα εδω υπαρχει το προβλημα .μηπως μπορω να τον αλαξω απο aspmail σε Aspemail .
ΕΧΑΡΙΣΤΩ ΠΟΛΥ .

Ο ΚΩΔΙΚΑΣ ΕΙΝΑΙ ΑΥΤΟΣ ____________


<%
Function SendEmail( sEmailServer, sFromEmail, sToEmail, sSubject, sText )
Dim objMail
set objMail = server.createobject("SMTPsvg.Mailer")
objMail.FromName = sFromEmail
objMail.FromAddress = sFromEmail
objMail.RemoteHost = sEmailServer
objMail.AddRecipient sToEmail, sToEmail
objMail.Subject = sSubject
objMail.BodyText = sText
if objMail.SendMail then
SendEmail = ""
else
' Message send failure
SendEmail = objMail.Response
end if
Set objMail = nothing
End Function
%>






 


Απάντηση από:Alex

Τι λάθος σου βγάζει;

Απάντηση από:bobos

Συνκεκριμένα είναι η tositementor

toplist

Βγάζει αυτό τό Μήνυμα

__________________


Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/cgi-bin/topsitelist/incgenmail.asp, line 4

Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.

___________________

Ευχαριστώ

Απάντηση από:Alex

Αν AspEmail

Τότε πρέπει να ζητήσεις το Persits.MailSender και όχι το SMTPsvg.Mailer

Αναλυτικότερα εδώ: http://www.aspemail.com/manual_02.html

Απάντηση από:bobos

Τώρα βγάζει αυτο το μήνυμα

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'objMail.FromAddress'

/topsitelist/incgenmail.asp, line 6

_________

Η εφαρμογή είναι αυτή http://www.bass-school.com/tsmentor.zip

Καί τή δοκιμάζω εδώ

http://www.bass-school.com/topsitelist/showlist.asp


Ευχαριστώ .

Απάντηση από:Alex

Δώσε τα παρακάτω
<%
Function SendEmail( sEmailServer, sFromEmail, sToEmail, sSubject, sText )

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.From = sFromEmail
Mail.FromName = sFromEmail
Mail.Host = sEmailServer
Mail.AddAddress sToEmail, sToEmail
Mail.Subject = sSubject
Mail.Body = sText
strErr = ""
bSuccess = False
On Error Resume Next
Mail.Send
If Err <> 0 Then
strErr = Err.Description
else
bSuccess = True
End If
End If
End Function
%>

Απάντηση από:bobos

Ευχαριστώ , Το δοκίμασα αλά τίποτα πάλι .
Τώρα βγάζει αυτο το μήνυμα



Microsoft VBScript compilation error '800a03f7'

Expected 'Function'

/topsitelist/incgenmail.asp, line 20

End If
----^

__________________

Εδώ είναι όλη η εφαρμογή .

http://www.bass-school.com/tsmentor.zip

είναι στό incgenmail.asp

Ευχαριστώ .

Απάντηση από:bobos

ΑΥΤΟ ΕΙΝΑΙ ΤΟ joinlist.asp




<%
OPTION EXPLICIT
Response.Buffer = True
%>
<!--#include file="inctopsite.asp"-->
<!--#include file="incgenmail.asp"-->



<%

Function VerifyName( sName )
' Dim nCount
' Const szValidChars = "abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ0123456789"

If sName = "" Then
VerifyName = "Must enter a name"
Exit Function
End If
' For nCount = 1 To Len(sName )
' If InStr( szValidChars, InStr( nCount, sName, 1 ) ) <= 0 Then
' VerifyName = "Valid characters are A-Z,a-z, 0-9"
' End If
' Next
VerifyName = ""
End Function

Function VerifyPasswords( s1, s2 )
If s1 = "" Then
VerifyPasswords = "Must enter passwords"
Exit Function
End If
If s1 <> s2 Then
VerifyPasswords = "Password and password again not equal"
Exit Function
End If
If Len(s1) < 5 Then
VerifyPasswords = "Password must be at least 5 chars"
End If
End Function


Function IsValidEmail( ByVal sString )
Dim sEmail, nIndex, nDotIndex
IsValidEmail = False
sString = Trim(sString)

'Check if it does contain any '@'
nIndex = InStr(1, sString, "@")
If nIndex < 2 Then 'Cant be first either
Exit Function
End If

'Now check where the dot is
nDotIndex = InStrRev(sString, "." )
If nDotIndex < nIndex + 1 Then
Exit Function
End If

'String can only have one '@'
If InStr( nIndex + 1, sString, "@" ) > nIndex Then
Exit Function
End If

'Check domain - at least two characters
' Response.Write "DOTINDEX:" &nDotIndex &":::Len(sString)" &Len(sString) & "<br>"
' Response.Write "Minus:" &Len(sString)-nDotIndex &"<br>"

If nDotIndex > Len( sString ) - 2 Then
Exit Function
End If

If Len(sString)-nDotIndex >3 Then
Exit Function
End If

IsValidEmail = True
End Function



Function VerifyEmail( s1 )
If s1 = "" Then
VerifyEmail = "Not a valid email address"
Exit Function
End If
If IsValidEmail(s1)=False Then
VerifyEmail="Not an valid email address"
End If
End Function

Function VerifyUrl( s1 )
If s1 = "" Then
VerifyUrl = "Not a valid url"
Exit Function
End If
End Function

Function VerifyBannerUrl( s1 )
If s1 = "" Then
VerifyBannerUrl = "Not a valid url"
Exit Function
End If
End Function



'Some before doings...
Dim oConn, sRubrik
Set oConn = IncTopsite_GetDatabaseConn()

Dim sPassword, sPasswordAgain, sBannerUrl, sUrl, sEmail, sSiteName, sSiteDescr, sCat
Dim sPasswordError, sBannerUrlError, sUrlError, sEmailError, sSiteNameError, sSiteDescrError


'1. Are we saving
If Request.QueryString("save")="yes" Then
'
sPassword=Request.Form("password")
sPasswordAgain=Request.Form("password1")
sUrl=Request.Form("url")
sEmail=Request.Form("email")
sSiteName=Request.Form("sitename")
sSiteDescr=Request.Form("sitedescr")
sCat = Request.Form("cat")

sSiteNameError = VerifyName( sSiteName )
' sSiteDescrError = VerifyDescr( sSiteDescr )
sPasswordError = VerifyPasswords( sPassword, sPasswordAgain )
sEmailError = VerifyEmail( sEmail )
sUrlError=VerifyBannerUrl( sUrl )

If sSiteNameError="" And sSiteDescrError="" And sPasswordError="" And sEmailError="" And sUrlError="" Then
'Save it...
Dim oRSTC
Set oRSTC = Server.CreateObject("ADODB.Recordset")
oRSTC.Open "select * from " & IncTopsite_GetTablePrefix() & "site where id=-1", oConn,1,3
oRSTC.AddNew()
oRSTC("sitename")=sSiteName
oRSTC("sitedescr")=Left(sSiteDescr,255)
oRSTC("password")=sPassword
oRSTC("url")=sUrl
oRSTC("email")=sEmail
oRSTC("catid")=sCat
oRSTC("joinedwhen")=Now()
oRSTC("incount")=0
oRSTC("outcount")=0
oRSTC.Update
Dim nNewId
nNewId = oRSTC("id").Value
oRSTC.Close
Set oRSTC = Nothing
If nNewId = "" Then
Set oRSTC = oConn.Execute("select @@identity as newid")
nNewId = oRSTC("newid").Value
oRSTC.Close
Set oRSTC = Nothing
End If
oConn.Close
Set oConn = Nothing

'Send a mail...
Dim sMsg
sMsg = "Thanks for joining " & g_strTitle & "!" & vbCrLf & vbCrLf
sMsg = sMsg & "Here are some info you need:" & vbCrLf
sMsg = sMsg & "-----------------------------" & vbCrLf
sMsg = sMsg & "Userid:" & nNewId & vbCrLf
sMsg = sMsg & "Password:" & sPassword & vbCrLf
sMsg = sMsg & "-----------------------------" & vbCrLf
sMsg = sMsg & "1. HTML to place on your website:" & vbCrLf& vbCrLf
sMsg = sMsg & "<a href='" & g_strPath & "rankem.asp?manager=sexusex.com&id=" & CStr(nNewId) & "'><img src='" & g_strButtonImagePath & "'></a>" & vbCrLf& vbCrLf
sMsg = sMsg & "2. To change your profile login at: " & g_strPath & "admin.asp" & vbCrLf
sMsg = sMsg & "3. See the list at: " & g_strPath & "/showlist.asp" & vbCrLf& vbCrLf

SendEmail g_MailServer, g_OutgoingMailFrom, sEmail, g_strTitle & " information", sMsg

'Redirect to show page
Response.Redirect "added.asp?id=" & nNewId
Response.Flush
Response.End
End If
End If
%>

<html>

<head>
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Topsite sexusex.com</title>
<style type="text/css">
<!--
body { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
td { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
th { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:hover {text-decoration: underline;}
-->
</style>
</head>

<body bgcolor="<%=g_strBodyColor%>">

<table border="0" width="100%">
<tr>
<td width="100%" align="center">
<%=FAQ_GetAd( 1 )%> <hr>
</td>
</tr>
<tr>
<td width="100%" align="center"><font color="#660000" face="Tahoma,Verdana,Arial" size="+3"><b>Join our toplist!</b></font><BR><b><font size="2"><br>
1.
Enter the information</font></b>
<p><b><font size="2">2. You will receive the HTML code to add to your site
immedietly as well as some account information and the
url to the account admin page, where you can change password, description,
category etc.</font></b></p>
<p><b><font size="2">3. That's it!&nbsp;&nbsp;As soon as someone clicks on
the button on your site you will get credit on the list!&nbsp;</font></b></p>
<p>&nbsp;</p>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td valign="top" align="center">
<hr>
<table border="0" width="100%">
</table>
<form method="POST" action="joinlist.asp?save=yes">
<table border="0">
<tr>
<td width="50%">Email address:</td>
<td width="50%">
<input type="text" name="email" size="20" value="<%=sEmail%>">
<%If sEmailError <> "" Then%><br><font size="1" color="#FF0000"><%=sEmailError%></font><%End If%>
</td>
</tr>
<tr>
<td width="50%">Desired password:</td>
<td width="50%"><input type="password" name="password" size="20">
<%If sPasswordError <> "" Then%><br><font size="1" color="#FF0000"><%=sPasswordError%></font><%End If%>
</td>
</tr>

<tr>
<td width="50%">Password again:</td>
<td width="50%"><input type="password" name="password1" size="20"></td>
</tr>

<tr>
<td width="50%">Site name:</td>
<td width="50%"><input type="text" name="sitename" size="20" value="<%=sSiteName%>">
<%If sSitenameError <> "" Then%><br><font size="1" color="#FF0000"><%=sSitenameError%></font><%End If%>
</td>
</tr>

<tr>
<td width="50%">Site description ( max 2255 letters ):</td>
<td width="50%"><textarea rows="2" name="sitedescr" cols="20"><%=sSiteDescr%></textarea>
<%If sSiteDescrError <> "" Then%><br><font size="1" color="#FF0000"><%=sSiteDescrError%></font><%End If%>
</td>
</tr>

<tr>
<td width="50%">Site url:</td>
<td width="50%"><input type="text" name="url" size="20" value="<%=sUrl%>">
<%If sUrlError <> "" Then%><br><font size="1" color="#FF0000"><%=sUrlError%></font><%End If%>
</td>
</tr>

<tr>
<td width="50%">Category:</td>
<td width="50%"><select size="1" name="cat">
<% ListCategories 1, False %>
</select></td>
</tr>

<tr>
<td width="50%"></td>
<td width="50%"></td>
</tr>

<tr>
<td width="50%"></td>
<td width="50%"></td>
</tr>

<tr>
<td width="50%"><input type="submit" value="Submit" name="B1"></td>
<td width="50%"></td>
</tr>

</table>
</form>
<p>&nbsp;</p>
<hr>
<p> <%=FAQ_GetAd( 2 )%><br><%=FAQ_GetAd( 3 )%>
</p>
</td>
</tr>
</table>

<table border="0" width="100%">
<tr>
<td width="100%" align="center"><FONT face="Arial,sans serif" size=2>© </FONT> <font size="1" face="Arial,sans serif">2000
<a href="http://www.sexusex.com">sexusex.com</a></font></td>
</tr>
<br>
<br>
</table>

<p align="center">&nbsp;</p>

</body>
<%
oConn.Close
Set oConn = Nothing
%>
</html>


ΕΥΧΑΡΙΣΤΩ

Απάντηση από:bobos

ΤΟ ΒΡΗΚΑ ΕΙΝΑΙ ΤΟ ΠΑΡΑΚΑΤΩ .

ΕΥΧΑΡΙΣΤΩ ΦΙΛΕ ALEX ΓΙΑ ΤΗ ΒΟΗΘΕΙΑ ΣΟΥ .

___________________________


<%
Function SendEmail( sEmailServer, sFromEmail, sToEmail, sSubject, sText )
Dim objMail
Set objMail = CreateObject("CDONTS.NewMail")
objMail.From = sFromEmail
objMail.To = sToEmail
objMail.Subject = sSubject
objMail.BodyFormat = 0
objMail.MailFormat = 0
objMail.Body = sText
objMail.Send
Set objMail = nothing
End Function

%>


ΕΥΧΑΡΙΣΤΩ.



tip: * F5 για νέο tip

   Πίσω στην προηγούμενη σελίδα






Η Εταιρία | Web Hosting | Domain names | Web Information | Υπηρεσίες | Resellers | Υποστήριξη |
Copyright © 2007–09 4GR.NETWORKS, All rights reserved.