title: Jenkins: Can't send zip archive via email
body: <p>I want to fetch project source code from GitLab, archive it and send it via email.</p>
  <p><strong>Jenkinsfile:</strong></p>
  <pre><code>def gitlabRepo = 'http://repository.vrpconsulting.com/roman.skaskevich/koshcheck-copy.git'
  deleteDir()
  dir('koshcheck-copy') {
      stage 'Fetch'
      def curdir = pwd()
      echo curdir
      git url: &quot;${gitlabRepo}&quot;, branch: 'master'
  
      stage 'Archive'
      zip archive: true, dir: './src', glob: '', zipFile: 'src.zip'
      def savedZip = archive 'src.zip'
      echo savedZip
  
      stage 'Notify'
      emailext (
          to: 'roman.skaskevich@gmail.com',
          subject: &quot;ZIP&quot;,
          body: &quot;Attached zip must be there&quot;,
          attachmentsPattern: 'src.zip'
      )
  }
  </code></pre>
  <p>I don't know if project archived successfully, but it isn't sent via email.</p>
  <p><strong>EDIT #1</strong></p>
  <p>Problem lay in that archive wasn't created. So I perform command which runs local 7zip for create archive: <code>bat &quot;\&quot;C:\\Program Files (x86)\\7-Zip\\7z.exe\&quot; a -tzip src.zip src&quot;</code>.</p>
  <p>Now remain the problem with sending this archive via email. Because job finished successfully, but returned:</p>
  <blockquote>
  <p>Sending email to: roman.skaskevich@gmail.com</p>
  <p>Error sending to the following VALID addresses: roman.skaskevich@gmail.com</p>
  </blockquote>
  <p>I found <a href="https://stackoverflow.com/questions/16191040/jenkins-ext-email-plugin-fails-to-send-email-on-build-success">this article</a> in which suggests, that attachment is too large. But I decrease size of archive from 7MB to 250kB and have the same problem.</p>
  <p>Thanks in advance!</p>