marcos_804 Postado Outubro 13, 2004 Denunciar Share Postado Outubro 13, 2004 alguém SABE QUAL É A PORTA E O ENDEREÇO PARA O ENVIO DE E-MAIL ATRAVES DE UM FORMULARIO DE ENVIO DE EMAIL?SE SOUMER ME DIZWWW.1ASPHOST.COM Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 dark0 Postado Outubro 13, 2004 Denunciar Share Postado Outubro 13, 2004 ué?como assim porta?se o codigo é enviado por formulario, o padrão é 80 .. pois é a porta da web ... Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 bareta Postado Outubro 13, 2004 Denunciar Share Postado Outubro 13, 2004 que codigo c ta usando??? Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 marcos_804 Postado Outubro 13, 2004 Autor Denunciar Share Postado Outubro 13, 2004 (editado) VOU MOSTRAR O CODIGO AGORA<%'Insert your mailserver name and port (usually 25)mailserver="mail.1asphost.com:25"AQUI QUE TEM DE CONFIGURAR, alguém SABE COMO?%><html><head><title>Sakki's digital postcards</title><%Flag = request.form("Flag")If IsEmpty(Flag) or Flag = "" then%></head><body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff"><font size="6" face="arial">Send a digital postcard</font><br><hr><br><form action="skrifa.asp" method="POST" ><font size="5" face="arial">Choose your heading</font><br><br><font size="3" face="arial"><input type="text" name="fsogn" size="50" value="Merry christmas ! ! ! "><br><hr><br><font size="5" face="arial">Chooser your image</font><br><br> <input type="radio" checked name="mynd" value="1.jpg"><img src="1.jpg" width="130" height="90"><input type="radio" name="mynd" value="2.jpg"><img src="2.jpg" width="130" height="90"><input type="radio" name="mynd" value="3.jpg"><img src="3.jpg" width="130" height="90"><br><input type="radio" name="mynd" value="4.jpg"><img src="4.jpg" width="130" height="90"><input type="radio" name="mynd" value="5.jpg"><img src="5.jpg" width="130" height="90"><input type="radio" name="mynd" value="6.jpg"><img src="6.jpg" width="130" height="90"><hr><table border="0"><tr><td> </td><td>Message:</td><td> </td><td> </td></tr><tr><td> </td><td rowspan="4"><textarea name="kvedja" rows="8" cols="20"></textarea></td><td>To:</td><td><input type="text" size="20" name="nafn1" Value="<%= Request.QueryString("nafn") %>"></td></tr><tr><td> </td><td>Email</td><td><input type="text" size="20" name="netfang1" Value="<%= Request.QueryString("send") %>"></td></tr><tr><td> </td><td>From</td><td><input type="text" size="20" name="nafn2"></td></tr><tr><td> </td><td>Email</td><td><input type="text" size="20" name="netfang2"></td></tr></table><br><br><input type="hidden" name="Flag" value=1><input type="submit" value=" Preview postcard "></form><%end ifif flag = 1 thenanafn1 = request.form("nafn1")anetfang1 = request.form("netfang1")anafn2 = request.form("nafn2")anetfang2 = request.form("netfang2")akvedja = request.form("kvedja")afsogn = request.form("fsogn")amynd = request.form("mynd")akvedja = server.HTMLencode(Request.form("kvedja"))akvedja = Replace(akvedja, vbCrLf, "<br>")%></head><body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff"><center><font size="5">Postcard preview...</font><br><table border="1" width="700"> <tr> <td rowspan="2" width="500"><font size="5"><em><b><%= afsogn %> </b></em></font><br> <br> <center><img src="<%= amynd %>"></center><br><b><%= akvedja %></b> </td> <td width="200"> </td> </tr> <tr> <td width="200" rowspan="2"><font color="#FFFF00"><b>To:<br> <%= anafn1 %><br> </b></font><a href="<%= anetfang1 %>"><font color="#FFFF00"><b><%= anetfang1 %></b></font></a><font color="#FFFF00"><b><br> <br> From:<br><%= anafn2 %><br></b></font><a href="<%= anetfang2 %>"><fontcolor="#FFFF00"><b><%= anetfang2 %></b></font></a><fontcolor="#FFFF00"><b> </b></font></td></tr></table><form action="skrifa.asp" method="POST"><input type="hidden" name="nafn1" value="<%= anafn1 %>"><input type="hidden" name="netfang1" value="<%= anetfang1 %>"><input type="hidden" name="nafn2" value="<%= anafn2 %>"><input type="hidden" name="netfang2" value="<%= anetfang2 %>"><input type="hidden" name="kvedja" value="<%= akvedja %>"><input type="hidden" name="mynd" value="<%= amynd %>"><input type="hidden" name="fsogn" value="<%= afsogn %>"><input type="hidden" name="flag" value="2"><input type="submit" value="Send postcard"><input type="button" value="Fix it" OnClick="javascript:history.go(-1)"></center><br><%End IfIf Flag = 2 thenRandomizeapass = int(rnd*99999)+1adags = now()anafn1 = request.form("nafn1")anetfang1 = request.form("netfang1")anafn2 = request.form("nafn2")anetfang2 = request.form("netfang2")akvedja = request.form("kvedja")afsogn = request.form("fsogn")amynd = request.form("mynd")set conn = server.createobject("adodb.connection")DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "DSNtemp=dsntemp & "DBQ=" & server.mappath("kort.mdb")conn.Open DSNtempSQLstmt = "INSERT INTO kort (pass,dags,nafn1,netfang1,nafn2,netfang2,kvedja,fsogn,mynd)"SQLstmt = SQLstmt & " VALUES (" SQLstmt = SQLstmt & "'" & apass & "',"SQLstmt = SQLstmt & "'" & adags & "',"SQLstmt = SQLstmt & "'" & anafn1 & "',"SQLstmt = SQLstmt & "'" & anetfang1 & "',"SQLstmt = SQLstmt & "'" & anafn2 & "',"SQLstmt = SQLstmt & "'" & anetfang2 & "',"SQLstmt = SQLstmt & "'" & akvedja & "',"SQLstmt = SQLstmt & "'" & afsogn & "',"SQLstmt = SQLstmt & "'" & amynd & "'"SQLstmt = SQLstmt & ")"Set RS = conn.execute(SQLstmt)If err.number>0 thenresponse.write "VBScript error:" & "<P>"response.write "Number=" & err.number & "<P>"response.write "Explanation.=" & err.description & "<P>"response.write "Help Context=" & err.helpcontext & "<P>" response.write "Help Path=" & err.helppath & "<P>"response.write "Native Error=" & err.nativeerror & "<P>"response.write "Source=" & err.source & "<P>"response.write "SQLState=" & err.sqlstate & "<P>"end ifIF conn.errors.count> 0 thenresponse.write "Access database error" & "<P>"response.write SQLstmt & "<P>"for counter= 0 to conn.errors.countresponse.write "Error #" & conn.errors(counter).number & "<P>"response.write "Explanation. -> " & conn.errors(counter).description & "<P>"nextConn.Closeset conn = nothingelseConn.Closeset conn = nothingset conn = server.createobject("adodb.connection")DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "DSNtemp=dsntemp & "DBQ=" & server.MapPath("kort.mdb")conn.Open DSNtempsqlstmt = "SELECT * FROM kort WHERE nafn1 = "sqlstmt = sqlstmt & "'" & anafn1 & "'"sqlstmt = sqlstmt & " AND pass = "sqlstmt = sqlstmt & apasssqlstmt = sqlstmt & " ORDER BY id DESC;"'rs.Open sqlstmt,conn,3,3set rs = conn.Execute(sqlstmt)id = rs("id")Conn.CloseSet conn = nothingdim mailbodyscriptname = Request.servervariables("script_name")scriptname = Replace(scriptname,"skrifa.asp","skoda.asp")scriptname = "http://" & request.servervariables("server_name") & scriptnamemailbody = anafn2 & " has sent you a postcard" & Vbcrlf & vbcrlfmailbody = mailbody & "You can pick your postcard up at the address :" & vbcrlfmailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apassmailbody = mailbody & vbcrlf & vbcrlfmailbody = mailbody & "Or visit " & scriptname & vbcrlfmailbody = mailbody & "And enter" & vbcrlfmailbody = mailbody & "Postcard Id = " & id & vbcrlfmailbody = mailbody & "Postcard Password = " & apass & vbCrlf & vbcrlfmailbody = mailbody & "Written by Sakki - http://www.welcome.to/sakki"blabla = "Postcard from " & anafn2'Response.Write mailbodyset SMTP=Server.CreateObject("Jmail.SMTPMail")SMTP.ServerAddress= mailserverSMTP.Sender=anetfang2SMTP.AddRecipient anetfang1SMTP.Subject=blablaSMTP.Body=mailbodySMTP.Execute%></head><body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff"><b>Thank you !!<br>Postcard has been sent to : <a href="mailto:<%= anetfang1 %>"><%= anafn1 %></a><br>Sender is : <a href="mailto:<%= anetfang2 %>"><%= anafn2 %></a><br><BR><A href="javascript:history.go(-3)">Back</A><%end ifend if%></body></html>Editado: Para usar TAGS de formatação de texto em códigos, utilize a tag QUOTE! Editado Outubro 13, 2004 por dark0 Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 bareta Postado Outubro 13, 2004 Denunciar Share Postado Outubro 13, 2004 bom usa o jmail....aqui tem um exemplo:http://www.mco2.com.br/suporte_componentes_jmail.asp Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 marcos_804 Postado Outubro 13, 2004 Autor Denunciar Share Postado Outubro 13, 2004 mas como faço isso? Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 bareta Postado Outubro 13, 2004 Denunciar Share Postado Outubro 13, 2004 tenta isso: <% mailserver="mail.1asphost.com" %> <html> <head> <title>Sakki's digital postcards</title> <% Flag = request.form("Flag") If IsEmpty(Flag) or Flag = "" then %> </head> <body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff"> <font size="6" face="arial"> Send a digital postcard</font> <br><hr><br> <form action="skrifa.asp" method="POST" > <font size="5" face="arial">Choose your heading</font><br><br> <font size="3" face="arial"> <input type="text" name="fsogn" size="50" value="Merry christmas ! ! ! "><br><hr><br> <font size="5" face="arial">Chooser your image</font><br><br> <input type="radio" checked name="mynd" value="1.jpg"> <img src="1.jpg" width="130" height="90"> <input type="radio" name="mynd" value="2.jpg"> <img src="2.jpg" width="130" height="90"> <input type="radio" name="mynd" value="3.jpg"> <img src="3.jpg" width="130" height="90"> <br> <input type="radio" name="mynd" value="4.jpg"> <img src="4.jpg" width="130" height="90"> <input type="radio" name="mynd" value="5.jpg"> <img src="5.jpg" width="130" height="90"> <input type="radio" name="mynd" value="6.jpg"> <img src="6.jpg" width="130" height="90"> <hr> <table border="0"> <tr><td> </td><td>Message:</td><td> </td><td> </td></tr> <tr><td> </td><td rowspan="4"><textarea name="kvedja" rows="8" cols="20"></textarea></td><td>To:</td><td><input type="text" size="20" name="nafn1" Value="<%= Request.QueryString("nafn") %>"></td></tr> <tr><td> </td><td>Email</td><td><input type="text" size="20" name="netfang1" Value="<%= Request.QueryString("send") %>"></td></tr> <tr><td> </td><td>From</td><td><input type="text" size="20" name="nafn2"></td></tr> <tr><td> </td><td>Email</td><td><input type="text" size="20" name="netfang2"></td></tr> </table><br><br> <input type="hidden" name="Flag" value=1> <input type="submit" value=" Preview postcard "> </form> <% end if if flag = 1 then anafn1 = request.form("nafn1") anetfang1 = request.form("netfang1") anafn2 = request.form("nafn2") anetfang2 = request.form("netfang2") akvedja = request.form("kvedja") afsogn = request.form("fsogn") amynd = request.form("mynd") akvedja = server.HTMLencode(Request.form("kvedja")) akvedja = Replace(akvedja, vbCrLf, "<br>") %> </head> <body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff"> <center><font size="5">Postcard preview...</font><br> <table border="1" width="700"> <tr> <td rowspan="2" width="500"><font size="5"><em><b><%= afsogn %> </b></em></font><br> <br> <center><img src="<%= amynd %>"></center><br><b><%= akvedja %></b> </td> <td width="200"> </td> </tr> <tr> <td width="200" rowspan="2"><font color="#FFFF00"><b>To:<br> <%= anafn1 %><br> </b></font><a href="<%= anetfang1 %>"><font color="#FFFF00"><b><%= anetfang1 %></b></font></a><font color="#FFFF00"><b><br> <br> From:<br> <%= anafn2 %><br> </b></font><a href="<%= anetfang2 %>"><font color="#FFFF00"><b><%= anetfang2 %></b></font></a><font color="#FFFF00"><b> </b></font></td> </tr> </table> <form action="skrifa.asp" method="POST"> <input type="hidden" name="nafn1" value="<%= anafn1 %>"> <input type="hidden" name="netfang1" value="<%= anetfang1 %>"> <input type="hidden" name="nafn2" value="<%= anafn2 %>"> <input type="hidden" name="netfang2" value="<%= anetfang2 %>"> <input type="hidden" name="kvedja" value="<%= akvedja %>"> <input type="hidden" name="mynd" value="<%= amynd %>"> <input type="hidden" name="fsogn" value="<%= afsogn %>"> <input type="hidden" name="flag" value="2"> <input type="submit" value="Send postcard"> <input type="button" value="Fix it" OnClick="javascript:history.go(-1)"> </center> <br> <% End If If Flag = 2 then Randomize apass = int(rnd*99999)+1 adags = now() anafn1 = request.form("nafn1") anetfang1 = request.form("netfang1") anafn2 = request.form("nafn2") anetfang2 = request.form("netfang2") akvedja = request.form("kvedja") afsogn = request.form("fsogn") amynd = request.form("mynd") set conn = server.createobject("adodb.connection") DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtemp=dsntemp & "DBQ=" & server.mappath("kort.mdb") conn.Open DSNtemp SQLstmt = "INSERT INTO kort (pass,dags,nafn1,netfang1,nafn2,netfang2,kvedja,fsogn,mynd)" SQLstmt = SQLstmt & " VALUES (" SQLstmt = SQLstmt & "'" & apass & "'," SQLstmt = SQLstmt & "'" & adags & "'," SQLstmt = SQLstmt & "'" & anafn1 & "'," SQLstmt = SQLstmt & "'" & anetfang1 & "'," SQLstmt = SQLstmt & "'" & anafn2 & "'," SQLstmt = SQLstmt & "'" & anetfang2 & "'," SQLstmt = SQLstmt & "'" & akvedja & "'," SQLstmt = SQLstmt & "'" & afsogn & "'," SQLstmt = SQLstmt & "'" & amynd & "'" SQLstmt = SQLstmt & ")" Set RS = conn.execute(SQLstmt) If err.number>0 then response.write "VBScript error:" & "<P>" response.write "Number=" & err.number & "<P>" response.write "Explanation.=" & err.description & "<P>" response.write "Help Context=" & err.helpcontext & "<P>" response.write "Help Path=" & err.helppath & "<P>" response.write "Native Error=" & err.nativeerror & "<P>" response.write "Source=" & err.source & "<P>" response.write "SQLState=" & err.sqlstate & "<P>" end if IF conn.errors.count> 0 then response.write "Access database error" & "<P>" response.write SQLstmt & "<P>" for counter= 0 to conn.errors.count response.write "Error #" & conn.errors(counter).number & "<P>" response.write "Explanation. -> " & conn.errors(counter).description & "<P>" next Conn.Close set conn = nothing else Conn.Close set conn = nothing set conn = server.createobject("adodb.connection") DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " DSNtemp=dsntemp & "DBQ=" & server.MapPath("kort.mdb") conn.Open DSNtemp sqlstmt = "SELECT * FROM kort WHERE nafn1 = " sqlstmt = sqlstmt & "'" & anafn1 & "'" sqlstmt = sqlstmt & " AND pass = " sqlstmt = sqlstmt & apass sqlstmt = sqlstmt & " ORDER BY id DESC;" 'rs.Open sqlstmt,conn,3,3 set rs = conn.Execute(sqlstmt) id = rs("id") Conn.Close Set conn = nothing dim mailbody scriptname = Request.servervariables("script_name") scriptname = Replace(scriptname,"skrifa.asp","skoda.asp") scriptname = "http://" & request.servervariables("server_name") & scriptname mailbody = anafn2 & " has sent you a postcard" & Vbcrlf & vbcrlf mailbody = mailbody & "You can pick your postcard up at the address :" & vbcrlf mailbody = mailbody & ScriptName & "?id=" & id & "&pass=" & apass mailbody = mailbody & vbcrlf & vbcrlf mailbody = mailbody & "Or visit " & scriptname & vbcrlf mailbody = mailbody & "And enter" & vbcrlf mailbody = mailbody & "Postcard Id = " & id & vbcrlf mailbody = mailbody & "Postcard Password = " & apass & vbCrlf & vbcrlf mailbody = mailbody & "Written by Sakki - http://www.welcome.to/sakki" blabla = "Postcard from " & anafn2 'Response.Write mailbody set SMTP=Server.CreateObject("Jmail.Message") SMTP.ServerAddress= mailserver SMTP.Sender=anetfang2 SMTP.AddRecipient anetfang1 SMTP.Subject=blabla SMTP.Body=mailbody SMTP.Execute %> </head> <body bgcolor="#000000" text="#ffffff" link="#ffffff" alink="#ffffff" vlink="#ffffff"> <b> Thank you !!<br> Postcard has been sent to : <a href="mailto:<%= anetfang1 %>"><%= anafn1 %></a><br> Sender is : <a href="mailto:<%= anetfang2 %>"><%= anafn2 %></a><br> <BR><A href="javascript:history.go(-3)">Back</A> <% end if end if %> </body> </html> viu esse server é gratis num é????????? Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 marcos_804 Postado Outubro 13, 2004 Autor Denunciar Share Postado Outubro 13, 2004 êta, bareta, não deu certo.da erro la na lina 181, la onde tem o "CreateObject("jmail......")" Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 bareta Postado Outubro 14, 2004 Denunciar Share Postado Outubro 14, 2004 (editado) mais o server é gratis não é?você sabe quais o componentes que tem lá???http://scriptbrasil.com.br/forum/index.php...ndpost&p=136751 Editado Outubro 14, 2004 por bareta Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
marcos_804
alguém SABE QUAL É A PORTA E O ENDEREÇO PARA O ENVIO DE E-MAIL ATRAVES DE UM FORMULARIO DE ENVIO DE EMAIL?
SE SOUMER ME DIZ
WWW.1ASPHOST.COM
Link para o comentário
Compartilhar em outros sites
8 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.