mirror of
				https://github.com/dawidd6/action-send-mail.git
				synced 2025-10-31 07:06:26 +07:00 
			
		
		
		
	* Added ability to adjust priority to the mail message (#66) Co-authored-by: John Pastore <cbbm142@github.com> Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
This commit is contained in:
		
							
								
								
									
										1
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							| @ -55,3 +55,4 @@ jobs: | ||||
|           from: github-actions | ||||
|           attachments: ${{matrix.attachments}} | ||||
|           convert_markdown: ${{matrix.convert_markdown}} | ||||
|           priority: high | ||||
|  | ||||
| @ -48,6 +48,8 @@ Some features: | ||||
|     convert_markdown: true | ||||
|     # Optional attachments: | ||||
|     attachments: attachments.zip,git.diff,./dist/static/main.js | ||||
|     # Optional priority: 'high', 'normal' (default) or 'low' | ||||
|     priority: low | ||||
| ``` | ||||
|  | ||||
| ## Troubleshooting | ||||
|  | ||||
| @ -53,6 +53,9 @@ inputs: | ||||
|   attachments: | ||||
|     description: Files that will be added to mail message attachments (separated with comma) | ||||
|     required: false | ||||
|   priority: | ||||
|     description: Set Priority level for the mail message to 'high', 'normal' (default) or 'low' | ||||
|     required: false | ||||
| runs: | ||||
|   using: node12 | ||||
|   main: main.js | ||||
|  | ||||
							
								
								
									
										4
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.js
									
									
									
									
									
								
							| @ -47,6 +47,7 @@ async function main() { | ||||
|         const attachments = core.getInput("attachments", { required: false }) | ||||
|         const convertMarkdown = core.getInput("convert_markdown", { required: false }) | ||||
|         const ignoreCert = core.getInput("ignore_cert", { required: false }) | ||||
|         const priority = core.getInput("priority", { required: false }) | ||||
|  | ||||
|         if (!username || !password) { | ||||
|             core.warning("Username and password not specified. You should only do this if you are using a self-hosted runner to access an on-premise mail server.") | ||||
| @ -74,7 +75,8 @@ async function main() { | ||||
|             replyTo: replyTo ? replyTo : undefined, | ||||
|             text: body ? getBody(body, false) : undefined, | ||||
|             html: htmlBody ? getBody(htmlBody, convertMarkdown) : undefined, | ||||
|             attachments: attachments ? attachments.split(',').map(f => ({ path: f.trim() })) : undefined | ||||
|             attachments: attachments ? attachments.split(',').map(f => ({ path: f.trim() })) : undefined, | ||||
|             priority: priority ? priority : undefined, | ||||
|         }) | ||||
|     } catch (error) { | ||||
|         core.setFailed(error.message) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 cbbm142
					cbbm142