![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
25/11/2006, 13:38
|
| | Fecha de Ingreso: noviembre-2006
Mensajes: 4
Antigüedad: 18 años, 2 meses Puntos: 0 | |
Urgente Ayuda! Problema Con Formmail Hola a todos, me comunico con ustedes ya que son la comunidad mas grande y creo que son los unicos que me vana poder ayudar....
Sinceramente tengo u inconveniente urgente con FormMail.CGI, necesito que el mail ke se envia se envie en formato HTML y no como texto... provè detodo pero no lo puedo lograr, esto es para una pagina de mi trabajo y lña tengo ke terminar antes del viernes que viene sino se pone en juego mi trabajo.... HELPME!!!!!
La empresa usa solamente CGI por eso no puedo hacer nada en PHP y esto me limita muchisismo. probè colocando Content Type y todo eso pero me lo escrebe como texto en el mail no toma ese valor. sinceramente ya no se que hacer, hace un mes que estoy con esto y no o logro sacar adelante... por favor espero su ayuda. . . aqui les dejo la parte de mi FormMail en donde escribe el mail aver si me pueden decir en donde coloco el conbtent type o que es lo que hay ke modificar. . . DEsde ya muchas gracias a todos. . . .
sub send_mail {
# Localize variables used in this subroutine. #
local($print_config,$key,$sort_order,$sorted_field ,$env_report);
# Open The Mail Program
if ($Config{'pgp'} =~ /\w/)
{ open (MAIL, "|/etc/support/pgpencrypt $Config{'pgp'}"); }
elsif ($Config{'pgp_key'} =~ /\w/)
{ open (MAIL, "|/etc/support/pgpencrypt $Config{'pgp_key'}"); }
else
{ open(MAIL,"|$mailprog -t"); }
$Config{'subject'} = remove_newlines_and_other_nasties($Config{'subject '});
$Config{'realname'} = remove_newlines_and_other_nasties($Config{'realnam e'});
# addresses are now validated before they get this far
#$Config{'email'} = validated_email_syntax($Config{'email'});
#$Config{'recipient'} = validated_email_syntax($Config{'recipient'});
#$Config{'ccrecipient'} = validated_email_syntax($Config{'ccrecipient'});
#$Config{'bccrecipient'} = validated_email_syntax($Config{'bccrecipient'});
print MAIL "To: $Config{'recipient'}\n";
if ($Config{'ccrecipient'})
{ print MAIL "CC: $Config{'ccrecipient'}\n"; }
if ($Config{'bccrecipient'})
{ print MAIL "BCC: $Config{'bccrecipient'}\n"; }
print MAIL "From: $Config{'email'} ($Config{'realname'})\n";
# Check for Message Subject 159
if ($Config{'subject'}) { print MAIL "Subject: $Config{'realname'} $Config{'subject'}\n\n" }
else { print MAIL "Subject: WWW Form Submission\n\n" }
print MAIL "Below is the result of your feedback form. It was submitted by\n";
print MAIL "$Config{'realname'} ($Config{'email'}) on $date\n";
print MAIL "-" x 75 . "\n\n";
if (@Print_Config) {
foreach $print_config (@Print_Config) {
if ($Config{$print_config}) {
print MAIL "$print_config: $Config{$print_config}\n\n";
}
}
}
# Sort alphabetically if specified: #
if ($Config{'sort'} eq 'alphabetic') {
foreach $field (sort keys %Form) {
# If the field has a value or the print blank fields option #
# is turned on, print out the form field and value. #
if ($Config{'print_blank_fields'} || $Form{$field} ||
$Form{$field} eq '0') {
print MAIL "$field: $Form{$field}\n\n";
}
}
}
# If a sort order is specified, sort the form fields based on that. #
elsif ($Config{'sort'} =~ /^order:.*,.*/) {
# Remove extraneous line breaks and spaces, remove the order: #
# directive and split the sort fields into an array. #
$Config{'sort'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;
$Config{'sort'} =~ s/(\s+)?\n+(\s+)?//g;
$Config{'sort'} =~ s/order://;
@sorted_fields = split(/,/, $Config{'sort'});
# For each sorted field, if it has a value or the print blank #
# fields option is turned on print the form field and value. #
foreach $sorted_field (@sorted_fields) {
if ($Config{'print_blank_fields'} || $Form{$sorted_field} ||
$Form{$sorted_field} eq '0') {
print MAIL "$sorted_field: $Form{$sorted_field}\n\n";
}
}
}
# Otherwise, default to the order in which the fields were sent. #
else {
# For each form field, if it has a value or the print blank #
# fields option is turned on print the form field and value. #
foreach $field (@Field_Order) {
if ($Config{'print_blank_fields'} || $Form{$field} ||
$Form{$field} eq '0') {
print MAIL "$field: $Form{$field}\n\n";
}
}
}
print MAIL "-" x 75 . "\n\n";
# Send any specified Environment Variables to recipient. #
foreach $env_report (@Env_Report) {
if ($ENV{$env_report}) {
print MAIL "$env_report: $ENV{$env_report}\n";
}
}
close (MAIL);
} |