Jump to content


Photo

Como Fazer O Sendmail.php Em Asp


  • Faça o login para participar
4 replies to this topic

#1 LM..

LM..

    Turista

  • Usuários
  • 31 posts
  • Sexo:Não informado

Posted 15/10/2008, 14:53

Olá amigos,

Utilizo um flash onde o sendmail.php é a ponte para o envio do email e preciso criar um igual em asp, pois a plataforma é windows.. alguém pode me ajudar...

abaixo está o sendmail.php completo

<?php
$contact_name = utf8_decode(@$_POST['name']);
$contact_email = utf8_decode(@$_POST['email']);
$contact_subject = utf8_decode(@$_POST['subject']);
$contact_message = utf8_decode(@$_POST['message']);

if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "leo@mpbra.com.br";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Nome: $contact_name \nEmail: $sender \nAssunto: $contact_subject \nMensagem: $contact_message \nIP: $client_ip \nEnviado pelo site";
$extra = "De: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();

if( mail( $receiver, "Email do Site - $subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>


Obrigado
L.M.

#2 Pedropauloalmeida

Pedropauloalmeida

    Fale ao motorista somente o indispensável

  • Usuários
  • 1376 posts
  • Sexo:Masculino
  • Localidade:Santo André SP

Posted 15/10/2008, 15:17

Tópico movido.
Transformar PHP para ASP -> sala de ASP.NET

Abraços.

pp

#3 LM..

LM..

    Turista

  • Usuários
  • 31 posts
  • Sexo:Não informado

Posted 16/10/2008, 19:49

ok, desculpe por postar errado, mas alguém sabe me informar, qual sendmail.asp, seria substituido por esse sem problemas?
muito obrigado...
LM

#4 LM..

LM..

    Turista

  • Usuários
  • 31 posts
  • Sexo:Não informado

Posted 28/10/2008, 00:55

alguémmmmm sabe me ajudarrrrrrrrrrrrrrrrrr????????????????????????????????? nossa a dias e nada... por favor me ajudem...

#5 MACUL

MACUL

    Doutor

  • Usuários
  • 770 posts
  • Sexo:Masculino
  • Localidade:SP

Posted 30/10/2008, 15:00

primeiro é ASP3 ou .net ?



Iniciando Em .net, Onde Baixar Os Programas Web Matrix / Framework, O que é .NET / ASP.NET

'Set the properties
'Assign the SMTP server
obj.SmtpServer = txtSMTPServer.Text

'Multiple recepients can be specified using; as the delimeter
'Address of the recipient
Mailmsg.To = txtTo.Text

'Your From Address
'You can also use a custom header Reply-To for a different replyto address
Mailmsg.From = "\" & txtFromDisplayName.Text & "\ <" & txtFrom.Text & ">"

'Specify the body format
If chkFormat.Checked = True Then
  Mailmsg.BodyFormat = MailFormat.Html 'Send the mail in HTML Format
Else
  Mailmsg.BodyFormat = MailFormat.Text
End If

'If you want you can add a reply to header 
'Mailmsg.Headers.Add("Reply-To", "sample@sample.net")
'custom headersare added like this
'Mailmsg.Headers.Add("Manoj", "TestHeader")

'Mail Subject
Mailmsg.Subject = txtSubject.Text

'Attach the files one by one
For Counter = 0 To lstAttachment.Items.Count - 1
  Attachment = New MailAttachment(lstAttachment.Items(Counter))
  'Add it to the mail message
  Mailmsg.Attachments.Add(Attachment)
Next

'Mail Body
Mailmsg.Body = txtMessage.Text

'Call the send method to send the mail
obj.Send(Mailmsg)
http://www.codeproje...b/SendMail.aspx
*************** M ** A ** C ** U ** L ***************

*************************************************




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq