bin381
bin381

Reputation: 362

phpmailer - attach large file

I use phpmailer to send a big attachment which is about 5M,but it fails. here is the message.

Fatal error: Maximum execution time of 30 seconds exceeded in F:\wamp\www\mail\class.smtp.php on line 580

Time Memory Function Location

1 0.0010 146208 { main }( ) ..\mail.php:0

2 0.0121 533592 smtp_mail( ) ..\mail.php:65

3 0.0126 539672 PHPMailer->Send( ) ..\mail.php:53

4 0.0928 7303432 PHPMailer->PostSend( ) ..\class.phpmailer.php:763

5 0.0929 7303600 PHPMailer->SmtpSend( ) ..\class.phpmailer.php:845

6 0.3744 14189928 SMTP->Data( ) ..\class.phpmailer.php:1023

how can i solve this problem?i want to send a big attachment? thanks

Upvotes: 1

Views: 2635

Answers (1)

Paul Calabro
Paul Calabro

Reputation: 1906

You need to specify a longer set_time_limit value. The default is 30 seconds. If your script's execution time takes longer than this to complete, you'll get that error. More info here:

http://php.net/manual/en/function.set-time-limit.php

Upvotes: 2

Related Questions