charly Posted December 2, 2009 at 09:26 PM Report Share #298487 Posted December 2, 2009 at 09:26 PM Boas a todos, eu estou agora a preparar um campeonato de CS 1.6, onde os pagamentos serão feitos por sms, e depois a pagina redirecciona para uma página de inscrição. www.nexusystem.site11.com esta página terá um botão chamado enviar, que chamará mail.php com o seguinte código: <?php $a="admin.nexusystem@sapo.pt"; $subject="Email de Teste"; $message="Olá! Esta é um simples mensagem de email"; $from="cs_dog@hotmail.com"; $headers="From: $from"; mail ($a, $subject, $message, $headers); echo "email enviado!"; ?> Segundo as informações que tenho, a variável $message, pode ter 70 caracteres por linha, eu gostaria de saber quantas linhas pode conter esta variável. Link to comment Share on other sites More sharing options...
IceBrain Posted December 2, 2009 at 11:24 PM Report Share #298521 Posted December 2, 2009 at 11:24 PM Teoricamente, o único limite é aquele que o teu servidor SMTP te puser. O do GMail é de 20MB, o que dá para uns bons milhares de caracteres. Mas nada como testar: file_get_contents() de um ficheiro de texto grande, guardas na $message e mandas 🙂 ❝The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.❞- John Carmack on software patents A list of command line apps Link to comment Share on other sites More sharing options...
mAiN_iNfEcTiOn Posted December 4, 2009 at 10:45 AM Report Share #298674 Posted December 4, 2009 at 10:45 AM Citando a php.net @ http://pt.php.net/manual/en/function.mail.php message Message to be sent. Each line should be separated with a LF (\n). Lines should not be larger than 70 characters. Caution (Windows only) When PHP is talking to a SMTP server directly, if a full stop is found on the start of a line, it is removed. To counter-act this, replace these occurrences with a double dot. <?php $text = str_replace("\n.", "\n..", $text); ?> Ou seja, nao é o limite imposto pelo SMTP, é o limite imposto pela função 😛 -------------- De qualquer forma, eu recomendo-te o uso de classes de terceiros para o envio de e-mails. Eis algumas classes: - PHPmailer @ http://phpmailer.worxware.com/index.php?pg=examples - SwiftMailer @ http://swiftmailer.org/ Abraço 🙂 Link to comment Share on other sites More sharing options...
IceBrain Posted December 4, 2009 at 03:05 PM Report Share #298698 Posted December 4, 2009 at 03:05 PM Segundo as informações que tenho, a variável $message, pode ter 70 caracteres por linha, eu gostaria de saber quantas linhas pode conter esta variável. @mAiN_iNfEcTiOn: Onde é que está o número máximo de linhas na variável nessa documentação? Isso só fala dos caracteres por linha, que o charly já sabia serem 70. ❝The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.❞- John Carmack on software patents A list of command line apps Link to comment Share on other sites More sharing options...
mAiN_iNfEcTiOn Posted December 4, 2009 at 04:10 PM Report Share #298710 Posted December 4, 2009 at 04:10 PM OMG ... Ice .. true... tens razão, pareceu-me ter lido (de relance) que era o limite por linha que pretendiam ... Sorry Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now