cancel
Showing results for 
Search instead for 
Did you mean: 

How to Region(dynamic) as an attachment through Mail

RiteshHanda
Level 3
Hi All, Can i send the Captured Region as an attachment through email? If possible then how to achieve the same. if not then please suggest how to capture and send the image/region(print screenshot from a browser )   Thanks  Ritesh
1 REPLY 1

AmiBarrett
Level 12

If you have a region defined, you can use a read stage with "Read Image" to save it to an image type Data Item. From there, you'll need a custom code stage to save the image.

Namespace Imports:
System.Drawing.Imaging

Inputs:
Image - Image
Path - Text
Image Format - Text

Outputs:
Success - Flag
Message - Text

Success = True 
Try Dim Format As ImageFormat 
	Select Case Image_Format.ToUpper 
	
	Case "BMP": 
	Format = ImageFormat.Bmp 
	
	Case "GIF": 
	Format = ImageFormat.Gif 
	
	Case "JPG": 
	Format = ImageFormat.Jpeg 
	
	Case "JPEG": 
	Format = ImageFormat.Jpeg 
	
	Case "PNG": 
	Format = ImageFormat.Png 
	
	Case "TIF": 
	Format = ImageFormat.Tiff 
	
	Case "TIFF":
	Format = ImageFormat.Tiff 
	
	Case Else:
	
	Throw New Exception("Image format not recognized") 
	End Select 
	Image.Save(Path, Format) Catch e As Exception 
	Success = False 
	Message = e.Message 
End Try