Jump to content

Asp Mail E Dosya Ekleme


Recommended Posts

asp de mail gidiyor denedim çalışıyor.

mail e dosya ve mesaj nasıl gönderebilirim?

kodlar aşağıda attachment koduyla oluyormuş çok uğraştım beceremedim. aşağıdaki kodlar çalışıyor mail gidiyor dediğim gibi birde dosya ekli gitmesi gerek. şimdi den tşk ederim yardımlarınız için.

 

aspmailform.html 

<html>
<head>
<meta http-equiv="Content-Language" content="tr">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
<title>Mail Form</title>
</head>
<body>

<form method="POST" action="aspmail.asp">
	<table border="1" width="100%">
		<tr>
			<td>Adı Soyadı</td>
			<td><input type="text" name="Adi_Soyadi" size="37"></td>
		</tr>
		<tr>
			<td>Mail Adresi</td>
			<td><input type="text" name="Mail_Adresi" size="37"></td>
		</tr>
		<tr>
			<td>Konu</td>
			<td><input type="text" name="Konu" size="37"></td>
		</tr>
		<tr>
			<td>Mesaj</td>
			<td><textarea rows="7" name="Mesaj" cols="36"></textarea></td>
		</tr>
	</table>
	<p><input type="submit" value="Gönder" name="B1"><input type="reset" value="Sıfırla" name="B2"></p>
</form>

</body>

</html>

aspmail.asp

<%
On Error Resume Next
For Each Doldur In Request.Form
	' Post edilen formdan bu adrese gelen bilgiler message değişkenine dolduruluyor.
	Message = Message & Doldur & ": " & Request.Form(Doldur) & CHR(10)
Next

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mail.xxxxx.com"								' mail host adresi 
Mail.Username = "[email protected]"							' Mail gönderen hesabın adı
Mail.Password = "xxxx"								' mail gönderen hesabın şifresi
Mail.From = "[email protected]"								' gönderici mail adresi
Mail.FromName = "Web Form"									' Gönderici adı
Mail.AddAddress "xxxxx[b][color=#FF0000]Forumda msn, mail, adres, gerçek isim vs. bilgilerinizi paylaşmayınız[/color][/b].com", "xxxx"			' alıcı adresi ve adı
Mail.AddReplyTo "[email protected]"						' Yanıla adresi istenirse kullanılmayabilir.
Mail.Subject = "test"										' mesaj başlığı
Mail.Body = Message											' Mesaj
Mail.Send

if err Then
	Response.Write err.Description							' hata mesajı ekrana yazılıyor
else
	Response.Redirect("http://www.google.com")		' mesaj gönderildikten sonra yonlendirilecek sayfa
end if
%>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...